diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2019-11-07 09:20:44 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-07 09:20:44 +0900 |
| commit | a2b4ad439cd11c3b9bfcc9b92c6feff6f7b0e042 (patch) | |
| tree | dd846ce5449eedb50ea5b196defec5a597a81a26 /src/liballoc | |
| parent | 3032233bb277202a5336c2dedee999a1b3e698c3 (diff) | |
| parent | 6a5931921ca751b8c6748111d15c5d97cb47fab4 (diff) | |
| download | rust-a2b4ad439cd11c3b9bfcc9b92c6feff6f7b0e042.tar.gz rust-a2b4ad439cd11c3b9bfcc9b92c6feff6f7b0e042.zip | |
Rollup merge of #66117 - olegnn:fixed_linked_list_marker, r=RalfJung
Fixed PhantomData markers in Arc and Rc Include owned internal structs in `PhantomData` markers in `Arc` (`PhantomData<T>` => `PhantomData<ArcInner<T>>`) and `Rc` (`PhantomData<T>` => `PhantomData<RcBox<T>>`).
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/linked_list.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/sync.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 48f9865b870..a0c9263673d 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -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>>>, 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")] |
