Skip to content

Commit 3a54ab7

Browse files
committed
LinkedList: PhantomData<Box<Node<T>>> => PhantomData<T>
1 parent 253fc0e commit 3a54ab7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/liballoc/collections/linked_list.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct LinkedList<T> {
3939
head: Option<NonNull<Node<T>>>,
4040
tail: Option<NonNull<Node<T>>>,
4141
len: usize,
42-
marker: PhantomData<Box<Node<T>>>,
42+
marker: PhantomData<T>,
4343
}
4444

4545
struct Node<T> {
@@ -60,7 +60,7 @@ pub struct Iter<'a, T: 'a> {
6060
head: Option<NonNull<Node<T>>>,
6161
tail: Option<NonNull<Node<T>>>,
6262
len: usize,
63-
marker: PhantomData<&'a Node<T>>,
63+
marker: PhantomData<&'a T>,
6464
}
6565

6666
#[stable(feature = "collection_debug", since = "1.17.0")]
@@ -90,7 +90,7 @@ impl<T> Clone for Iter<'_, T> {
9090
#[stable(feature = "rust1", since = "1.0.0")]
9191
pub struct IterMut<'a, T: 'a> {
9292
// We do *not* exclusively own the entire list here, references to node's `element`
93-
// have been handed out by the iterator! So be careful when using this; the methods
93+
// have been handed out by the iterator! So be careful when using this; the methods
9494
// called must be aware that there can be aliasing pointers to `element`.
9595
list: &'a mut LinkedList<T>,
9696
head: Option<NonNull<Node<T>>>,

0 commit comments

Comments
 (0)