Skip to content

Commit a43cf7f

Browse files
committed
Error message no longer implies #[track_caller] is a requirement for Rust ABI.
1 parent 43c07dd commit a43cf7f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2641,7 +2641,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
26412641
tcx.sess,
26422642
attr.span,
26432643
E0737,
2644-
"Rust ABI is required to use `#[track_caller]`"
2644+
"`#[track_caller]` requires Rust ABI"
26452645
).emit();
26462646
}
26472647
codegen_fn_attrs.flags |= CodegenFnAttrFlags::TRACK_CALLER;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(track_caller)] //~ WARN the feature `track_caller` is incomplete
22

3-
#[track_caller] //~ ERROR Rust ABI is required to use `#[track_caller]`
3+
#[track_caller]
44
extern "C" fn f() {}
5+
//~^^ ERROR `#[track_caller]` requires Rust ABI
56

67
fn main() {}

src/test/ui/rfc-2091-track-caller/error-with-invalid-abi.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #![feature(track_caller)]
66
|
77
= note: `#[warn(incomplete_features)]` on by default
88

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

0 commit comments

Comments
 (0)