about summary refs log tree commit diff
path: root/src/libcore/future
diff options
context:
space:
mode:
authorJosef Reinhard Brandl <mail@josefbrandl.de>2018-07-01 14:58:40 +0200
committerJosef Reinhard Brandl <mail@josefbrandl.de>2018-07-02 13:59:40 +0200
commitdd3b0337ff22260ef9dfc1bfcf58bd18386d4cbe (patch)
treee68315c6cfd09255913a65b681390ed40ff96ff3 /src/libcore/future
parent042928f0f591a63e0a2ed31c932015f4248d4fa7 (diff)
downloadrust-dd3b0337ff22260ef9dfc1bfcf58bd18386d4cbe.tar.gz
rust-dd3b0337ff22260ef9dfc1bfcf58bd18386d4cbe.zip
Improve doc comments for `FutureObj`
Diffstat (limited to 'src/libcore/future')
-rw-r--r--src/libcore/future/future_obj.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libcore/future/future_obj.rs b/src/libcore/future/future_obj.rs
index 67bd3de98c1..b42fd2b5bd7 100644
--- a/src/libcore/future/future_obj.rs
+++ b/src/libcore/future/future_obj.rs
@@ -19,7 +19,7 @@ use mem::PinMut;
 use task::{Context, Poll};
 
 /// A custom trait object for polling futures, roughly akin to
-/// `Box<dyn Future<Output = T>>`.
+/// `Box<dyn Future<Output = T> + 'a>`.
 /// Contrary to `FutureObj`, `LocalFutureObj` does not have a `Send` bound.
 pub struct LocalFutureObj<'a, T> {
     ptr: *mut (),
@@ -86,7 +86,7 @@ impl<'a, T> Drop for LocalFutureObj<'a, T> {
 }
 
 /// A custom trait object for polling futures, roughly akin to
-/// `Box<dyn Future<Output = T>> + Send`.
+/// `Box<dyn Future<Output = T> + Send + 'a>`.
 pub struct FutureObj<'a, T>(LocalFutureObj<'a, T>);
 
 unsafe impl<'a, T> Send for FutureObj<'a, T> {}
@@ -135,7 +135,8 @@ pub unsafe trait UnsafeFutureObj<'a, T>: 'a {
     ///
     /// The trait implementor must guarantee that it is safe to repeatedly call
     /// `poll` with the result of `into_raw` until `drop` is called; such calls
-    /// are not, however, allowed to race with each other or with calls to `drop`.
+    /// are not, however, allowed to race with each other or with calls to
+    /// `drop`.
     unsafe fn poll(ptr: *mut (), cx: &mut Context) -> Poll<T>;
 
     /// Drops the future represented by the given void pointer.