@@ -39,8 +39,8 @@ declare_lint! {
|
39 | 39 | /// } |
40 | 40 | /// |
41 | 41 | /// fn test<T: Trait>(x: T) { |
42 | | - /// fn is_send<T: Send>(_: T) {} |
43 | | - /// is_send(x.method()); // Not OK. |
| 42 | + /// fn spawn<T: Send>(_: T) {} |
| 43 | + /// spawn(x.method()); // Not OK. |
44 | 44 | /// } |
45 | 45 | /// ``` |
46 | 46 | /// |
@@ -68,11 +68,10 @@ declare_lint! {
|
68 | 68 | /// } |
69 | 69 | /// ``` |
70 | 70 | /// |
71 | | - /// Conversely, if the trait is used only locally, if only concrete types |
72 | | - /// that implement the trait are used, or if the trait author otherwise |
73 | | - /// does not care that the trait will not promise that the returned |
74 | | - /// [`Future`] implements any [auto traits] such as [`Send`], then the |
75 | | - /// lint may be suppressed. |
| 71 | + /// Conversely, if the trait is used only locally, if it is never used in |
| 72 | + /// 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. |
76 | 75 | /// |
77 | 76 | /// [`Future`]: https://doc.rust-lang.org/core/future/trait.Future.html |
78 | 77 | /// [`Send`]: https://doc.rust-lang.org/core/marker/trait.Send.html |
|