diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2023-10-04 18:20:05 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-04 18:20:05 -0400 | 
| commit | 2f5249019e94f99920dae6df832bde633b151eb4 (patch) | |
| tree | 089fad50434cbed9ca078cce3595da040472cba2 /compiler/rustc_lint/src/async_fn_in_trait.rs | |
| parent | c373d206cd9ed7beec89c72e61d76ad61d6d35c1 (diff) | |
| download | rust-2f5249019e94f99920dae6df832bde633b151eb4.tar.gz rust-2f5249019e94f99920dae6df832bde633b151eb4.zip | |
Apply suggestions from code review
Co-authored-by: Travis Cross <tc@traviscross.com>
Diffstat (limited to 'compiler/rustc_lint/src/async_fn_in_trait.rs')
| -rw-r--r-- | compiler/rustc_lint/src/async_fn_in_trait.rs | 9 | 
1 files 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 e0572b8ed43..ff4c81e2fc9 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 | 
