Implement Unpin for references
These don'town the backing storage for their data, so projecting `PinMut` into their fields is already unsound.
This commit is contained in:
parent
5fdcd3aa38
commit
2ce61c0aed
@ -625,6 +625,12 @@ pub struct Pinned;
|
||||
#[unstable(feature = "pin", issue = "49150")]
|
||||
impl !Unpin for Pinned {}
|
||||
|
||||
#[unstable(feature = "pin", issue = "49150")]
|
||||
impl<'a, T: ?Sized + 'a> Unpin for &'a T {}
|
||||
|
||||
#[unstable(feature = "pin", issue = "49150")]
|
||||
impl<'a, T: ?Sized + 'a> Unpin for &'a mut T {}
|
||||
|
||||
/// Implementations of `Copy` for primitive types.
|
||||
///
|
||||
/// Implementations that cannot be described in Rust
|
||||
|
Loading…
Reference in New Issue
Block a user