Skip to content

Commit 2f52490

Browse files
tmandrytraviscross
andauthored
Apply suggestions from code review
Co-authored-by: Travis Cross <tc@traviscross.com>
1 parent c373d20 commit 2f52490

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

compiler/rustc_lint/src/async_fn_in_trait.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ declare_lint! {
6868
/// }
6969
/// ```
7070
///
71+
/// This still allows the use of `async fn` within impls of the trait.
72+
/// However, it also means that the trait will never be compatible with
73+
/// impls where the returned [`Future`] of the method does not implement
74+
/// `Send`.
75+
///
7176
/// Conversely, if the trait is used only locally, if it is never used in
7277
/// generic functions, or if it is only used in single-threaded contexts
73-
/// that do not care whether the returned [`Future`] implements [auto traits]
74-
/// such as [`Send`], then the lint may be suppressed.
78+
/// that do not care whether the returned [`Future`] implements [`Send`],
79+
/// then the lint may be suppressed.
7580
///
7681
/// [`Future`]: https://doc.rust-lang.org/core/future/trait.Future.html
7782
/// [`Send`]: https://doc.rust-lang.org/core/marker/trait.Send.html

0 commit comments

Comments
 (0)