Skip to content

Commit

Permalink
Implement Unpin for FutureObj and LocalFutureObj
Browse files Browse the repository at this point in the history
  • Loading branch information
cramertj committed Jul 30, 2018
1 parent 54628c8 commit cbbcecb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libcore/future/future_obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pub struct LocalFutureObj<'a, T> {
_marker: PhantomData<&'a ()>,
}

impl<'a, T> Unpin for LocalFutureObj<'a, T> {}

impl<'a, T> LocalFutureObj<'a, T> {
/// Create a `LocalFutureObj` from a custom trait object representation.
#[inline]
Expand Down Expand Up @@ -104,6 +106,7 @@ impl<'a, T> Drop for LocalFutureObj<'a, T> {
/// information #44874)
pub struct FutureObj<'a, T>(LocalFutureObj<'a, T>);

impl<'a, T> Unpin for FutureObj<'a, T> {}
unsafe impl<'a, T> Send for FutureObj<'a, T> {}

impl<'a, T> FutureObj<'a, T> {
Expand Down

0 comments on commit cbbcecb

Please sign in to comment.