diff options
| author | Oleg Nosov <olegnosov1@gmail.com> | 2019-11-05 15:22:03 +0300 |
|---|---|---|
| committer | Oleg Nosov <olegnosov1@gmail.com> | 2019-11-05 15:44:57 +0300 |
| commit | 3a54ab78efc66c17a6d2bb57463f5dac4696c7ed (patch) | |
| tree | bf571419c335c112eb02b72eec1de19e2ff7f9be /src/liballoc | |
| parent | 253fc0ed742c235fa34c5d78814fa7b8a5e5e055 (diff) | |
| download | rust-3a54ab78efc66c17a6d2bb57463f5dac4696c7ed.tar.gz rust-3a54ab78efc66c17a6d2bb57463f5dac4696c7ed.zip | |
LinkedList: PhantomData<Box<Node<T>>> => PhantomData<T>
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/linked_list.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 702df250999..da06203a2cb 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<Box<Node<T>>>, + marker: PhantomData<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 Node<T>>, + marker: PhantomData<&'a T>, } #[stable(feature = "collection_debug", since = "1.17.0")] @@ -90,7 +90,7 @@ impl<T> Clone for Iter<'_, T> { #[stable(feature = "rust1", since = "1.0.0")] pub struct IterMut<'a, T: 'a> { // We do *not* exclusively own the entire list here, references to node's `element` - // have been handed out by the iterator! So be careful when using this; the methods + // have been handed out by the iterator! So be careful when using this; the methods // called must be aware that there can be aliasing pointers to `element`. list: &'a mut LinkedList<T>, head: Option<NonNull<Node<T>>>, |
