@@ -9,9 +9,9 @@ use core::{
99/// A custom trait object for polling futures, roughly akin to
1010/// `Box<dyn Future<Output = T> + 'a>`.
1111///
12- /// This custom trait object was introduced for two reasons:
13- /// - Currently it is not possible to take ` dyn Trait` by value and
14- /// `Box<dyn Trait>` is not available in no_std contexts.
12+ /// This custom trait object was introduced as currently it is not possible to
13+ /// take `dyn Trait` by value and `Box< dyn Trait>` is not available in no_std
14+ /// contexts.
1515pub struct LocalFutureObj < ' a , T > {
1616 ptr : * mut ( ) ,
1717 poll_fn : unsafe fn ( * mut ( ) , & mut Context < ' _ > ) -> Poll < T > ,
@@ -79,14 +79,13 @@ impl<T> Drop for LocalFutureObj<'_, T> {
7979/// A custom trait object for polling futures, roughly akin to
8080/// `Box<dyn Future<Output = T> + Send + 'a>`.
8181///
82- /// This custom trait object was introduced for two reasons:
83- /// - Currently it is not possible to take `dyn Trait` by value and
84- /// `Box<dyn Trait>` is not available in no_std contexts.
85- /// - The `Future` trait is currently not object safe: The `Future::poll`
86- /// method makes uses the arbitrary self types feature and traits in which
87- /// this feature is used are currently not object safe due to current compiler
88- /// limitations. (See tracking issue for arbitrary self types for more
89- /// information #44874)
82+ /// This custom trait object was introduced as currently it is not possible to
83+ /// take `dyn Trait` by value and `Box<dyn Trait>` is not available in no_std
84+ /// contexts.
85+ ///
86+ /// You should generally not need to use this type outside of `no_std` or when
87+ /// implementing `Spawn`, consider using [`BoxFuture`](crate::future::BoxFuture)
88+ /// instead.
9089pub struct FutureObj < ' a , T > ( LocalFutureObj < ' a , T > ) ;
9190
9291impl < T > Unpin for FutureObj < ' _ , T > { }
0 commit comments