Skip to content

Commit

Permalink
Generalize NonNull::from_raw_parts per ACP362
Browse files Browse the repository at this point in the history
I did the raw pointers in 125701, but apparently forgot `NonNull`.
  • Loading branch information
scottmcm committed Nov 11, 2024
1 parent d19aa69 commit 0af64b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0af64b6

Please sign in to comment.