Skip to content
Permalink
Browse files

Implement Unpin for all raw pointers

Like references and boxes, moving the pointer doesn't move the
pointed-to value, so this is safe.
  • Loading branch information...
sfackler committed Jul 11, 2019
1 parent 35cacbc commit 5a4845d0d44e4d3c4fab3ae45730d319ab3133af
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/libcore/marker.rs
@@ -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

0 comments on commit 5a4845d

Please sign in to comment.
You can’t perform that action at this time.