@@ -41,19 +41,19 @@ impl<'tcx> StructuredDiagnostic<'tcx> for MissingCastForVariadicArg<'tcx, '_> {
4141 err. downgrade_to_delayed_bug ( ) ;
4242 }
4343
44- let msg = if self . ty . is_fn ( ) {
45- err. help ( "a function item is zero-sized and needs to be casted into a function pointer to be used in FFI" )
44+ let msg = if self . ty . is_fn ( ) {
45+ err. help ( "a function item is zero-sized and needs to be casted into a function pointer to be used in FFI" )
4646 . note ( "for more information on function items, visit https://doc.rust-lang.org/reference/types/function-item.html" ) ;
47- "cast the value into a function pointer" . to_string ( )
48- } else {
49- format ! ( "cast the value to `{}`" , self . cast_ty)
50- } ;
51- err. span_suggestion_verbose (
52- self . span . shrink_to_hi ( ) ,
53- msg,
54- format ! ( " as {}" , snippet , self . cast_ty) ,
55- Applicability :: MachineApplicable ,
56- ) ;
47+ "cast the value into a function pointer" . to_string ( )
48+ } else {
49+ format ! ( "cast the value to `{}`" , self . cast_ty)
50+ } ;
51+ err. span_suggestion_verbose (
52+ self . span . shrink_to_hi ( ) ,
53+ msg,
54+ format ! ( " as {}" , self . cast_ty) ,
55+ Applicability :: MachineApplicable ,
56+ ) ;
5757
5858 err
5959 }
0 commit comments