Generalize NonNull::from_raw_parts
per ACP362
I did the raw pointers in 125701, but apparently forgot `NonNull`.
This commit is contained in:
parent
f5b62577f7
commit
fb26ba88f8
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,7 @@ impl<T: ?Sized> NonNull<T> {
|
|||
#[unstable(feature = "ptr_metadata", issue = "81513")]
|
||||
#[inline]
|
||||
pub const fn from_raw_parts(
|
||||
data_pointer: NonNull<()>,
|
||||
data_pointer: NonNull<impl super::Thin>,
|
||||
metadata: <T as super::Pointee>::Metadata,
|
||||
) -> NonNull<T> {
|
||||
// SAFETY: The result of `ptr::from::raw_parts_mut` is non-null because `data_pointer` is.
|
||||
|
|
Loading…
Add table
Reference in a new issue