You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`
Copy file name to clipboardexpand all lines: compiler/rustc_lint/messages.ftl
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ lint_array_into_iter =
7
7
8
8
lint_async_fn_in_trait = use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
9
9
.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
11
11
12
12
lint_atomic_ordering_fence = memory fences cannot have `Relaxed` ordering
13
13
.help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst`
Copy file name to clipboardexpand all lines: tests/ui/async-await/in-trait/warn.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ note: the lint level is defined here
10
10
|
11
11
LL | #![deny(async_fn_in_trait)]
12
12
| ^^^^^^^^^^^^^^^^^
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
0 commit comments