@@ -19,7 +19,7 @@ use mem::PinMut;
19
19
use task:: { Context , Poll } ;
20
20
21
21
/// A custom trait object for polling futures, roughly akin to
22
- /// `Box<dyn Future<Output = T>>`.
22
+ /// `Box<dyn Future<Output = T> + 'a >`.
23
23
/// Contrary to `FutureObj`, `LocalFutureObj` does not have a `Send` bound.
24
24
pub struct LocalFutureObj < ' a , T > {
25
25
ptr : * mut ( ) ,
@@ -86,7 +86,7 @@ impl<'a, T> Drop for LocalFutureObj<'a, T> {
86
86
}
87
87
88
88
/// A custom trait object for polling futures, roughly akin to
89
- /// `Box<dyn Future<Output = T>> + Send`.
89
+ /// `Box<dyn Future<Output = T> + Send + 'a> `.
90
90
pub struct FutureObj < ' a , T > ( LocalFutureObj < ' a , T > ) ;
91
91
92
92
unsafe impl < ' a , T > Send for FutureObj < ' a , T > { }
@@ -135,7 +135,8 @@ pub unsafe trait UnsafeFutureObj<'a, T>: 'a {
135
135
///
136
136
/// The trait implementor must guarantee that it is safe to repeatedly call
137
137
/// `poll` with the result of `into_raw` until `drop` is called; such calls
138
- /// are not, however, allowed to race with each other or with calls to `drop`.
138
+ /// are not, however, allowed to race with each other or with calls to
139
+ /// `drop`.
139
140
unsafe fn poll ( ptr : * mut ( ) , cx : & mut Context ) -> Poll < T > ;
140
141
141
142
/// Drops the future represented by the given void pointer.
0 commit comments