about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBryan Garza <1396101+bryangarza@users.noreply.github.com>2022-11-24 03:48:27 +0000
committerBryan Garza <1396101+bryangarza@users.noreply.github.com>2022-12-21 03:30:46 +0000
commite28a07a0a157b63dc11e9f590484d5332866623a (patch)
tree367eb41515224e5be4c08f664724934bb44e2636
parentdc2c4ce578bd3bee824e1b30789cfa6cb777e059 (diff)
downloadrust-e28a07a0a157b63dc11e9f590484d5332866623a.tar.gz
rust-e28a07a0a157b63dc11e9f590484d5332866623a.zip
update wording of lint
-rw-r--r--compiler/rustc_error_messages/locales/en-US/lint.ftl2
-rw-r--r--compiler/rustc_lint/src/builtin.rs2
-rw-r--r--src/test/ui/async-await/track-caller/issue-104588-no-op-track-caller.stderr2
-rw-r--r--src/test/ui/async-await/track-caller/panic-track-caller.nofeat.stderr2
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 a36a511bd4a..0d5507835a9 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 e90572cb238..c353f742516 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 bd39c9d092c..b41077a0b92 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 e0201f2238d..71d4b00cc6e 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 | | }