Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Cross <[email protected]>
  • Loading branch information
tmandry and traviscross committed Oct 4, 2023
1 parent c373d20 commit 2f52490
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions compiler/rustc_lint/src/async_fn_in_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@ declare_lint! {
/// }
/// ```
///
/// This still allows the use of `async fn` within impls of the trait.
/// However, it also means that the trait will never be compatible with
/// impls where the returned [`Future`] of the method does not implement
/// `Send`.
///
/// Conversely, if the trait is used only locally, if it is never used in
/// generic functions, or if it is only used in single-threaded contexts
/// that do not care whether the returned [`Future`] implements [auto traits]
/// such as [`Send`], then the lint may be suppressed.
/// that do not care whether the returned [`Future`] implements [`Send`],
/// then the lint may be suppressed.
///
/// [`Future`]: https://doc.rust-lang.org/core/future/trait.Future.html
/// [`Send`]: https://doc.rust-lang.org/core/marker/trait.Send.html
Expand Down

0 comments on commit 2f52490

Please sign in to comment.