about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/linked_list.rs4
-rw-r--r--src/liballoc/rc.rs2
-rw-r--r--src/liballoc/sync.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs
index da06203a2cb..8d73f352fd4 100644
--- a/src/liballoc/collections/linked_list.rs
+++ b/src/liballoc/collections/linked_list.rs
@@ -39,7 +39,7 @@ pub struct LinkedList<T> {
     head: Option<NonNull<Node<T>>>,
     tail: Option<NonNull<Node<T>>>,
     len: usize,
-    marker: PhantomData<T>,
+    marker: PhantomData<Box<Node<T>>>,
 }
 
 struct Node<T> {
@@ -60,7 +60,7 @@ pub struct Iter<'a, T: 'a> {
     head: Option<NonNull<Node<T>>>,
     tail: Option<NonNull<Node<T>>>,
     len: usize,
-    marker: PhantomData<&'a T>,
+    marker: PhantomData<&'a Node<T>>,
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index f1c4c32e116..a11f9e8c145 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -280,7 +280,7 @@ struct RcBox<T: ?Sized> {
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Rc<T: ?Sized> {
     ptr: NonNull<RcBox<T>>,
-    phantom: PhantomData<T>,
+    phantom: PhantomData<RcBox<T>>,
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 80d6c6e0d43..4b10f089c29 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -195,7 +195,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Arc<T: ?Sized> {
     ptr: NonNull<ArcInner<T>>,
-    phantom: PhantomData<T>,
+    phantom: PhantomData<ArcInner<T>>,
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]