diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 016f68bfc6b3..e203d51f612a 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -285,9 +285,9 @@ fn check_start_fn_ty(tcx: TyCtxt<'_>, start_def_id: LocalDefId) { tcx.sess, span, E0752, - "start is not allowed to be `async`" + "`start` is not allowed to be `async`" ) - .span_label(span, "start is not allowed to be `async`") + .span_label(span, "`start` is not allowed to be `async`") .emit(); error = true; } @@ -297,11 +297,11 @@ fn check_start_fn_ty(tcx: TyCtxt<'_>, start_def_id: LocalDefId) { tcx.sess .struct_span_err( attr.span, - "start is not allowed to be `#[track_caller]`", + "`start` is not allowed to be `#[track_caller]`", ) .span_label( start_span, - "start is not allowed to be `#[track_caller]`", + "`start` is not allowed to be `#[track_caller]`", ) .emit(); error = true; diff --git a/src/test/ui/async-await/issue-68523-start.rs b/src/test/ui/async-await/issue-68523-start.rs index 5988dffd68fa..2ced88a16cc4 100644 --- a/src/test/ui/async-await/issue-68523-start.rs +++ b/src/test/ui/async-await/issue-68523-start.rs @@ -4,6 +4,6 @@ #[start] pub async fn start(_: isize, _: *const *const u8) -> isize { -//~^ ERROR start is not allowed to be `async` +//~^ ERROR `start` is not allowed to be `async` 0 } diff --git a/src/test/ui/async-await/issue-68523-start.stderr b/src/test/ui/async-await/issue-68523-start.stderr index e471945900e7..3a0a3b5dece1 100644 --- a/src/test/ui/async-await/issue-68523-start.stderr +++ b/src/test/ui/async-await/issue-68523-start.stderr @@ -1,8 +1,8 @@ -error[E0752]: start is not allowed to be `async` +error[E0752]: `start` is not allowed to be `async` --> $DIR/issue-68523-start.rs:6:1 | LL | pub async fn start(_: isize, _: *const *const u8) -> isize { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ start is not allowed to be `async` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `start` is not allowed to be `async` error: aborting due to previous error diff --git a/src/test/ui/rfc-2091-track-caller/error-with-start.rs b/src/test/ui/rfc-2091-track-caller/error-with-start.rs index 678cb7fa404f..0cab47170631 100644 --- a/src/test/ui/rfc-2091-track-caller/error-with-start.rs +++ b/src/test/ui/rfc-2091-track-caller/error-with-start.rs @@ -1,7 +1,7 @@ #![feature(start)] #[start] -#[track_caller] //~ ERROR start is not allowed to be `#[track_caller]` +#[track_caller] //~ ERROR `start` is not allowed to be `#[track_caller]` fn start(_argc: isize, _argv: *const *const u8) -> isize { panic!("{}: oh no", std::panic::Location::caller()); } diff --git a/src/test/ui/rfc-2091-track-caller/error-with-start.stderr b/src/test/ui/rfc-2091-track-caller/error-with-start.stderr index 03b2ce5514f5..1a1f3e044913 100644 --- a/src/test/ui/rfc-2091-track-caller/error-with-start.stderr +++ b/src/test/ui/rfc-2091-track-caller/error-with-start.stderr @@ -1,4 +1,4 @@ -error: start is not allowed to be `#[track_caller]` +error: `start` is not allowed to be `#[track_caller]` --> $DIR/error-with-start.rs:4:1 | LL | #[track_caller] @@ -6,7 +6,7 @@ LL | #[track_caller] LL | / fn start(_argc: isize, _argv: *const *const u8) -> isize { LL | | panic!("{}: oh no", std::panic::Location::caller()); LL | | } - | |_- start is not allowed to be `#[track_caller]` + | |_- `start` is not allowed to be `#[track_caller]` error: aborting due to previous error