File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 3
3
//! Rust memory safety is based on this rule: Given an object `T`, it is only possible to
4
4
//! have one of the following:
5
5
//!
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**).
8
8
//!
9
9
//! This is enforced by the Rust compiler. However, there are situations where this rule is not
10
10
//! 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> {
251
251
#[ unstable( feature = "ptr_metadata" , issue = "81513" ) ]
252
252
#[ inline]
253
253
pub const fn from_raw_parts (
254
- data_pointer : NonNull < ( ) > ,
254
+ data_pointer : NonNull < impl super :: Thin > ,
255
255
metadata : <T as super :: Pointee >:: Metadata ,
256
256
) -> NonNull < T > {
257
257
// 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