We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8d63269 + 2adc07f commit 08d5df8Copy full SHA for 08d5df8
src/librustc_typeck/lib.rs
@@ -178,8 +178,10 @@ fn require_c_abi_if_variadic(tcx: TyCtxt,
178
abi: Abi,
179
span: Span) {
180
if decl.variadic && abi != Abi::C {
181
- span_err!(tcx.sess, span, E0045,
+ let mut err = struct_span_err!(tcx.sess, span, E0045,
182
"variadic function must have C calling convention");
183
+ err.span_label(span, &("variadics require C calling conventions").to_string())
184
+ .emit();
185
}
186
187
src/test/compile-fail/E0045.rs
@@ -8,7 +8,8 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045
+extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045
12
+ //~| NOTE variadics require C calling conventions
13
14
fn main() {
15
0 commit comments