Rollup merge of #35541 - hank-der-hafenarbeiter:E0045, r=jonathandturner

Updated E0045 to new error format (no bonus)

Part of #35501
r? @jonathandturner
This commit is contained in:
Jonathan Turner 2016-08-11 06:34:00 -07:00 committed by GitHub
commit 08d5df8f5f
2 changed files with 5 additions and 2 deletions

View File

@ -178,8 +178,10 @@ fn require_c_abi_if_variadic(tcx: TyCtxt,
abi: Abi,
span: Span) {
if decl.variadic && abi != Abi::C {
span_err!(tcx.sess, span, E0045,
let mut err = struct_span_err!(tcx.sess, span, E0045,
"variadic function must have C calling convention");
err.span_label(span, &("variadics require C calling conventions").to_string())
.emit();
}
}

View File

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045
extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045
//~| NOTE variadics require C calling conventions
fn main() {
}