Rollup merge of #62583 - sfackler:unpin-raw, r=cramertj

Implement Unpin for all raw pointers

Like references and boxes, moving the pointer doesn't move the
pointed-to value, so this is safe.

r? @cramertj
This commit is contained in:
Mazdak Farrokhzad 2019-07-26 18:56:40 +02:00 committed by GitHub
commit d1f86c13e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -655,6 +655,12 @@ impl<'a, T: ?Sized + 'a> Unpin for &'a T {}
#[stable(feature = "pin", since = "1.33.0")]
impl<'a, T: ?Sized + 'a> Unpin for &'a mut T {}
#[stable(feature = "pin_raw", since = "1.38.0")]
impl<T: ?Sized> Unpin for *const T {}
#[stable(feature = "pin_raw", since = "1.38.0")]
impl<T: ?Sized> Unpin for *mut T {}
/// Implementations of `Copy` for primitive types.
///
/// Implementations that cannot be described in Rust