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.
1 parent b42a384 commit 88e318bCopy full SHA for 88e318b
src/librustc_typeck/lib.rs
@@ -181,8 +181,10 @@ fn require_c_abi_if_variadic(tcx: TyCtxt,
181
abi: Abi,
182
span: Span) {
183
if decl.variadic && abi != Abi::C {
184
- span_err!(tcx.sess, span, E0045,
185
- "variadic function must have C calling convention");
+ struct_span_err!(tcx.sess, span, E0045,
+ "variadic function must have C calling convention")
186
+ .span_label(span, &format!("variadics require C calling conventions"))
187
+ .emit()
188
}
189
190
src/test/compile-fail/E0045.rs
@@ -9,6 +9,7 @@
9
// except according to those terms.
10
11
extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045
12
+//~^ NOTE variadics require C calling conventions
13
14
fn main() {
15
0 commit comments