From e28a07a0a157b63dc11e9f590484d5332866623a Mon Sep 17 00:00:00 2001 From: Bryan Garza <1396101+bryangarza@users.noreply.github.com> Date: Thu, 24 Nov 2022 03:48:27 +0000 Subject: [PATCH] update wording of lint --- compiler/rustc_error_messages/locales/en-US/lint.ftl | 2 +- compiler/rustc_lint/src/builtin.rs | 2 +- .../track-caller/issue-104588-no-op-track-caller.stderr | 2 +- .../async-await/track-caller/panic-track-caller.nofeat.stderr | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_error_messages/locales/en-US/lint.ftl b/compiler/rustc_error_messages/locales/en-US/lint.ftl index a36a511bd4aa..0d5507835a9e 100644 --- a/compiler/rustc_error_messages/locales/en-US/lint.ftl +++ b/compiler/rustc_error_messages/locales/en-US/lint.ftl @@ -351,7 +351,7 @@ lint_builtin_mutable_transmutes = lint_builtin_unstable_features = unstable feature lint_ungated_async_fn_track_caller = `#[track_caller]` on async functions is a no-op - .suggestion = enable this feature + .suggestion = enable this unstable feature lint_builtin_unreachable_pub = unreachable `pub` {$what} .suggestion = consider restricting its visibility diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index e90572cb2388..c353f7425165 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1409,7 +1409,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller { |lint| { lint.span_label(span, "this function will not propagate the caller location"); if cx.tcx.sess.is_nightly_build() { - lint.span_suggestion(attr.span, fluent::suggestion, "#[closure_track_caller]", Applicability::MachineApplicable); + lint.span_suggestion(attr.span, fluent::suggestion, "closure_track_caller", Applicability::MachineApplicable); } lint } diff --git a/src/test/ui/async-await/track-caller/issue-104588-no-op-track-caller.stderr b/src/test/ui/async-await/track-caller/issue-104588-no-op-track-caller.stderr index bd39c9d092ca..b41077a0b924 100644 --- a/src/test/ui/async-await/track-caller/issue-104588-no-op-track-caller.stderr +++ b/src/test/ui/async-await/track-caller/issue-104588-no-op-track-caller.stderr @@ -2,7 +2,7 @@ warning: `#[track_caller]` on async functions is a no-op --> $DIR/issue-104588-no-op-track-caller.rs:4:1 | LL | #[track_caller] - | ^^^^^^^^^^^^^^^ help: enable this feature: `#[closure_track_caller]` + | ^^^^^^^^^^^^^^^ help: enable this unstable feature: `closure_track_caller` LL | async fn foo() {} | ----------------- this function will not propagate the caller location | diff --git a/src/test/ui/async-await/track-caller/panic-track-caller.nofeat.stderr b/src/test/ui/async-await/track-caller/panic-track-caller.nofeat.stderr index e0201f2238dd..71d4b00cc6e8 100644 --- a/src/test/ui/async-await/track-caller/panic-track-caller.nofeat.stderr +++ b/src/test/ui/async-await/track-caller/panic-track-caller.nofeat.stderr @@ -2,7 +2,7 @@ warning: `#[track_caller]` on async functions is a no-op --> $DIR/panic-track-caller.rs:50:1 | LL | #[track_caller] - | ^^^^^^^^^^^^^^^ help: enable this feature: `#[closure_track_caller]` + | ^^^^^^^^^^^^^^^ help: enable this unstable feature: `closure_track_caller` LL | / async fn bar_track_caller() { LL | | panic!() LL | | }