Skip to content

Commit

Permalink
Rollup merge of #52870 - cramertj:unpin-futureobj, r=aturon
Browse files Browse the repository at this point in the history
Implement Unpin for FutureObj and LocalFutureObj

cc @MajorBreakfast

r? @aturon
  • Loading branch information
Mark-Simulacrum authored Jul 30, 2018
2 parents 97cb818 + cbbcecb commit 415cc0d
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 415cc0d

Please sign in to comment.