@@ -381,17 +381,20 @@ impl<'a, 'tcx> CastCheck<'tcx> {
381381 if self . expr_ty . is_numeric ( ) {
382382 if self . expr_ty == fcx. tcx . types . u32 {
383383 err. multipart_suggestion (
384- "try `char::from_u32` instead" ,
384+ "consider using `char::from_u32` instead" ,
385385 vec ! [
386386 ( self . expr_span. shrink_to_lo( ) , "char::from_u32(" . to_string( ) ) ,
387387 ( self . expr_span. shrink_to_hi( ) . to( self . cast_span) , ")" . to_string( ) ) ,
388388 ] ,
389389 Applicability :: MachineApplicable ,
390390 ) ;
391391 } else if self . expr_ty == fcx. tcx . types . i8 {
392- err. span_help ( self . span , "try casting from `u8` instead" ) ;
392+ err. span_help ( self . span , "consider casting from `u8` instead" ) ;
393393 } else {
394- err. span_help ( self . span , "try `char::from_u32` instead (via a `u32`)" ) ;
394+ err. span_help (
395+ self . span ,
396+ "consider using `char::from_u32` instead (via a `u32`)" ,
397+ ) ;
395398 } ;
396399 }
397400 err. emit ( ) ;
@@ -643,7 +646,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
643646 let mtstr = mt. prefix_str ( ) ;
644647 err. span_suggestion_verbose (
645648 self . cast_span . shrink_to_lo ( ) ,
646- "try casting to a reference instead" ,
649+ "consider casting to a reference instead" ,
647650 format ! ( "&{mtstr}" ) ,
648651 Applicability :: MachineApplicable ,
649652 ) ;
0 commit comments