@@ -41,19 +41,19 @@ impl<'tcx> StructuredDiagnostic<'tcx> for MissingCastForVariadicArg<'tcx, '_> {
41
41
err. downgrade_to_delayed_bug ( ) ;
42
42
}
43
43
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" )
46
46
. 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
+ ) ;
57
57
58
58
err
59
59
}
0 commit comments