diff --git a/library/core/src/pin/unsafe_pinned.rs b/library/core/src/pin/unsafe_pinned.rs index b18b5d7c9ec0d..ede6e0d6106bd 100644 --- a/library/core/src/pin/unsafe_pinned.rs +++ b/library/core/src/pin/unsafe_pinned.rs @@ -120,8 +120,8 @@ impl UnsafePinned { #[inline(always)] #[must_use] #[unstable(feature = "unsafe_pinned", issue = "125735")] - pub const fn raw_get(this: *const Self) -> *const T { - this as *const T + pub const fn raw_get(this: *const Self) -> *mut T { + this as *const T as *mut T } /// Gets a mutable pointer to the wrapped value.