Error message no longer implies #[track_caller] is a requirement for Rust ABI.

This commit is contained in:
Adam Perry 2019-10-27 13:32:18 -07:00
parent eb679c9c5d
commit 28b2257160
3 changed files with 4 additions and 3 deletions

View file

@ -2616,7 +2616,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
tcx.sess,
attr.span,
E0737,
"Rust ABI is required to use `#[track_caller]`"
"`#[track_caller]` requires Rust ABI"
).emit();
}
codegen_fn_attrs.flags |= CodegenFnAttrFlags::TRACK_CALLER;

View file

@ -1,6 +1,7 @@
#![feature(track_caller)]
#[track_caller] //~ ERROR Rust ABI is required to use `#[track_caller]`
#[track_caller]
extern "C" fn f() {}
//~^^ ERROR `#[track_caller]` requires Rust ABI
fn main() {}

View file

@ -1,4 +1,4 @@
error[E0737]: Rust ABI is required to use `#[track_caller]`
error[E0737]: `#[track_caller]` requires Rust ABI
--> $DIR/error-with-invalid-abi.rs:3:1
|
LL | #[track_caller]