File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 33//! Rust memory safety is based on this rule: Given an object `T`, it is only possible to
44//! have one of the following:
55//!
6- //! - Having several immutable references (`&T`) to the object (also known as **aliasing**).
7- //! - Having one mutable reference (`&mut T`) to the object (also known as **mutability**).
6+ //! - Several immutable references (`&T`) to the object (also known as **aliasing**).
7+ //! - One mutable reference (`&mut T`) to the object (also known as **mutability**).
88//!
99//! This is enforced by the Rust compiler. However, there are situations where this rule is not
1010//! flexible enough. Sometimes it is required to have multiple references to an object and yet
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ impl<T: ?Sized> NonNull<T> {
251251 #[ unstable( feature = "ptr_metadata" , issue = "81513" ) ]
252252 #[ inline]
253253 pub const fn from_raw_parts (
254- data_pointer : NonNull < ( ) > ,
254+ data_pointer : NonNull < impl super :: Thin > ,
255255 metadata : <T as super :: Pointee >:: Metadata ,
256256 ) -> NonNull < T > {
257257 // SAFETY: The result of `ptr::from::raw_parts_mut` is non-null because `data_pointer` is.
You can’t perform that action at this time.
0 commit comments