about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-26 18:56:40 +0200
committerGitHub <noreply@github.com>2019-07-26 18:56:40 +0200
commitd1f86c13e4363e981c7d52312d24d00a24f6bd7f (patch)
tree2e7a445d6e2cb62bb6a7b9b5515871173bfba3b1
parent625aa60b3afcab76d7abda99780551d33a336976 (diff)
parent5a4845d0d44e4d3c4fab3ae45730d319ab3133af (diff)
downloadrust-d1f86c13e4363e981c7d52312d24d00a24f6bd7f.tar.gz
rust-d1f86c13e4363e981c7d52312d24d00a24f6bd7f.zip
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
-rw-r--r--src/libcore/marker.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index 39c390b4df6..79a188dbac9 100644
--- a/src/libcore/marker.rs
+++ b/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