about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-04-26 19:00:57 +0200
committerRalf Jung <post@ralfj.de>2020-04-26 19:00:57 +0200
commit7aebdb639ade703a2a9f55a83df21a79fbbd9f69 (patch)
tree44d1b7e5888c8223846468ce5db737d49f3a54d6 /src/libcore
parentec1f28f9614292c36b371d3758afffdd52cb9786 (diff)
remove Unique::from for shared pointer types
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ptr/unique.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/libcore/ptr/unique.rs b/src/libcore/ptr/unique.rs
index 87b56d951c6..d93dc1f3262 100644
--- a/src/libcore/ptr/unique.rs
+++ b/src/libcore/ptr/unique.rs
@@ -3,7 +3,6 @@ use crate::fmt;
 use crate::marker::{PhantomData, Unsize};
 use crate::mem;
 use crate::ops::{CoerceUnsized, DispatchFromDyn};
-use crate::ptr::NonNull;
 
 // ignore-tidy-undocumented-unsafe
 
@@ -171,19 +170,3 @@ impl<T: ?Sized> From<&mut T> for Unique<T> {
         unsafe { Unique { pointer: reference as *mut T, _marker: PhantomData } }
     }
 }
-
-#[unstable(feature = "ptr_internals", issue = "none")]
-impl<T: ?Sized> From<&T> for Unique<T> {
-    #[inline]
-    fn from(reference: &T) -> Self {
-        unsafe { Unique { pointer: reference as *const T, _marker: PhantomData } }
-    }
-}
-
-#[unstable(feature = "ptr_internals", issue = "none")]
-impl<T: ?Sized> From<NonNull<T>> for Unique<T> {
-    #[inline]
-    fn from(p: NonNull<T>) -> Self {
-        unsafe { Unique::new_unchecked(p.as_ptr()) }
-    }
-}