From 2f5249019e94f99920dae6df832bde633b151eb4 Mon Sep 17 00:00:00 2001 From: Tyler Mandry Date: Wed, 4 Oct 2023 18:20:05 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Travis Cross --- compiler/rustc_lint/src/async_fn_in_trait.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_lint/src/async_fn_in_trait.rs b/compiler/rustc_lint/src/async_fn_in_trait.rs index e0572b8ed43b1..ff4c81e2fc9b1 100644 --- a/compiler/rustc_lint/src/async_fn_in_trait.rs +++ b/compiler/rustc_lint/src/async_fn_in_trait.rs @@ -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