diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-11-11 00:05:17 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-11-11 00:05:17 -0800 |
| commit | fb26ba88f8de15e1980ea0f42ab27880ac81b332 (patch) | |
| tree | d351c5db8996d3874c2dc404b98bc1014e005669 | |
| parent | f5b62577f79396979585ee98ed3a52594207bce7 (diff) | |
| download | rust-fb26ba88f8de15e1980ea0f42ab27880ac81b332.tar.gz rust-fb26ba88f8de15e1980ea0f42ab27880ac81b332.zip | |
Generalize `NonNull::from_raw_parts` per ACP362
I did the raw pointers in 125701, but apparently forgot `NonNull`.
| -rw-r--r-- | library/core/src/ptr/non_null.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<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. |
