1
Fork 0

update wording of lint

This commit is contained in:
Bryan Garza 2022-11-24 03:48:27 +00:00
parent dc2c4ce578
commit e28a07a0a1
4 changed files with 4 additions and 4 deletions

View file

@ -351,7 +351,7 @@ lint_builtin_mutable_transmutes =
lint_builtin_unstable_features = unstable feature lint_builtin_unstable_features = unstable feature
lint_ungated_async_fn_track_caller = `#[track_caller]` on async functions is a no-op 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} lint_builtin_unreachable_pub = unreachable `pub` {$what}
.suggestion = consider restricting its visibility .suggestion = consider restricting its visibility

View file

@ -1409,7 +1409,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller {
|lint| { |lint| {
lint.span_label(span, "this function will not propagate the caller location"); lint.span_label(span, "this function will not propagate the caller location");
if cx.tcx.sess.is_nightly_build() { 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 lint
} }

View file

@ -2,7 +2,7 @@ warning: `#[track_caller]` on async functions is a no-op
--> $DIR/issue-104588-no-op-track-caller.rs:4:1 --> $DIR/issue-104588-no-op-track-caller.rs:4:1
| |
LL | #[track_caller] LL | #[track_caller]
| ^^^^^^^^^^^^^^^ help: enable this feature: `#[closure_track_caller]` | ^^^^^^^^^^^^^^^ help: enable this unstable feature: `closure_track_caller`
LL | async fn foo() {} LL | async fn foo() {}
| ----------------- this function will not propagate the caller location | ----------------- this function will not propagate the caller location
| |

View file

@ -2,7 +2,7 @@ warning: `#[track_caller]` on async functions is a no-op
--> $DIR/panic-track-caller.rs:50:1 --> $DIR/panic-track-caller.rs:50:1
| |
LL | #[track_caller] 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 | / async fn bar_track_caller() {
LL | | panic!() LL | | panic!()
LL | | } LL | | }