From fb26ba88f8de15e1980ea0f42ab27880ac81b332 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Mon, 11 Nov 2024 00:05:17 -0800 Subject: [PATCH] Generalize `NonNull::from_raw_parts` per ACP362 I did the raw pointers in 125701, but apparently forgot `NonNull`. --- library/core/src/ptr/non_null.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index ad24e50aa15..b69f8a4b9d3 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -251,7 +251,7 @@ impl NonNull { #[unstable(feature = "ptr_metadata", issue = "81513")] #[inline] pub const fn from_raw_parts( - data_pointer: NonNull<()>, + data_pointer: NonNull, metadata: ::Metadata, ) -> NonNull { // SAFETY: The result of `ptr::from::raw_parts_mut` is non-null because `data_pointer` is.