Skip to content

Commit b36a690

Browse files
authored
Unrolled build for rust-lang#116704
Rollup merge of rust-lang#116704 - compiler-errors:afit-lint-plus, r=tmandry Fix AFIT lint message to mention pitfall Addresses rust-lang#116184 (comment) by adding a short note. Not sure exactly of the wording -- I don't think this should be a blocker for the stabilization PR since we can iterate on this lint's messaging in the next few weeks in the worst case. r? `@tmandry` cc `@traviscross` `@jonhoo`
2 parents 495c5dd + 362b75b commit b36a690

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_lint/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lint_array_into_iter =
77
88
lint_async_fn_in_trait = use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
99
.note = you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future`
10-
.suggestion = you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`
10+
.suggestion = you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change
1111
1212
lint_atomic_ordering_fence = memory fences cannot have `Relaxed` ordering
1313
.help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst`

tests/ui/async-await/in-trait/warn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: the lint level is defined here
1010
|
1111
LL | #![deny(async_fn_in_trait)]
1212
| ^^^^^^^^^^^^^^^^^
13-
help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`
13+
help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change
1414
|
1515
LL - async fn not_send();
1616
LL + fn not_send() -> impl std::future::Future<Output = ()> + Send;

0 commit comments

Comments
 (0)