Error message no longer implies #[track_caller] is a requirement for Rust ABI.
This commit is contained in:
parent
eb679c9c5d
commit
28b2257160
3 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue