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_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

View File

@ -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
}

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
|
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
|

View File

@ -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 | | }