File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,10 @@ fn require_c_abi_if_variadic(tcx: TyCtxt,
178
178
abi : Abi ,
179
179
span : Span ) {
180
180
if decl. variadic && abi != Abi :: C {
181
- span_err ! ( tcx. sess, span, E0045 ,
181
+ let mut err = struct_span_err ! ( tcx. sess, span, E0045 ,
182
182
"variadic function must have C calling convention" ) ;
183
+ err. span_label ( span, & ( "variadics require C calling conventions" ) . to_string ( ) )
184
+ . emit ( ) ;
183
185
}
184
186
}
185
187
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- extern "Rust" { fn foo ( x : u8 , ...) ; } //~ ERROR E0045
11
+ extern "Rust" { fn foo ( x : u8 , ...) ; } //~ ERROR E0045
12
+ //~| NOTE variadics require C calling conventions
12
13
13
14
fn main ( ) {
14
15
}
You can’t perform that action at this time.
0 commit comments