From 985071b08f5c03e4f18d43c15f3ea82395588a5e Mon Sep 17 00:00:00 2001 From: CoffeeBlend Date: Tue, 12 Jan 2021 01:39:10 +0100 Subject: [PATCH] Fix implementation --- library/core/src/mem/maybe_uninit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index b186aa61eb0eb..fda0553f94c5f 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -840,7 +840,7 @@ impl MaybeUninit { // And thus the conversion is safe unsafe { intrinsics::assert_inhabited::(); - (&array as *const _ as *const T).read() + (&array as *const _ as *const [T; N]).read() } }