Skip to content

Commit 0af64b6

Browse files
committed
Generalize NonNull::from_raw_parts per ACP362
I did the raw pointers in 125701, but apparently forgot `NonNull`.
1 parent d19aa69 commit 0af64b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/ptr/non_null.rs

+1-1
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)