diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index eba7c6fb2d707..16baef137cbe2 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -407,11 +407,11 @@ impl [T; N] { dst.write(f(src)); guard.initialized += 1; } - // FIXME convert to crate::mem::transmute when works with generics + // FIXME: Convert to crate::mem::transmute once it works with generics. // unsafe { crate::mem::transmute::<[MaybeUninit; N], [U; N]>(dst) } crate::mem::forget(guard); // SAFETY: At this point we've properly initialized the whole array - // and we just need to cast it to the correct type + // and we just need to cast it to the correct type. unsafe { (&mut dst as *mut _ as *mut [U; N]).read() } } }