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:
commit
08d5df8f5f
@ -178,8 +178,10 @@ fn require_c_abi_if_variadic(tcx: TyCtxt,
|
|||||||
abi: Abi,
|
abi: Abi,
|
||||||
span: Span) {
|
span: Span) {
|
||||||
if decl.variadic && abi != Abi::C {
|
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");
|
"variadic function must have C calling convention");
|
||||||
|
err.span_label(span, &("variadics require C calling conventions").to_string())
|
||||||
|
.emit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user