Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_lint/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lint_array_into_iter =

lint_async_fn_in_trait = use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
.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`
.suggestion = you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`
.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

lint_atomic_ordering_fence = memory fences cannot have `Relaxed` ordering
.help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst`
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/in-trait/warn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: the lint level is defined here
|
LL | #![deny(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`
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
|
LL - async fn not_send();
LL + fn not_send() -> impl std::future::Future<Output = ()> + Send;
Expand Down