E0630, // rustc_const_unstable attribute must be paired with stable/unstable attribute
E0693, // incorrect `repr(align)` attribute format
E0694, // an unknown tool name found in scoped attributes
+ E0697, // invalid ABI
}
Some(abi) => Ok(Some(abi)),
None => {
let prev_span = self.prev_span;
- self.span_err(
+ let mut err = struct_span_err!(
+ self.sess.span_diagnostic,
prev_span,
- &format!("invalid ABI: expected one of [{}], \
- found `{}`",
- abi::all_names().join(", "),
- s));
+ E0697,
+ "invalid ABI: found `{}`",
+ s);
+ err.span_label(prev_span, "invalid ABI");
+ err.help(&format!("valid ABIs: {}", abi::all_names().join(", ")));
+ err.emit();
Ok(None)
}
}
-error: invalid ABI: expected one of [cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted], found `路濫狼á́́`
+error[E0697]: invalid ABI: found `路濫狼á́́`
--> $DIR/unicode.rs:11:8
|
LL | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
- | ^^^^^^^^^
+ | ^^^^^^^^^ invalid ABI
+ |
+ = help: valid ABIs: cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted
error: aborting due to previous error
+For more information about this error, try `rustc --explain E0697`.