We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94ec272 commit 664e456Copy full SHA for 664e456
library/core/src/array/mod.rs
@@ -407,11 +407,11 @@ impl<T, const N: usize> [T; N] {
407
dst.write(f(src));
408
guard.initialized += 1;
409
}
410
- // FIXME convert to crate::mem::transmute when works with generics
+ // FIXME: Convert to crate::mem::transmute once it works with generics.
411
// unsafe { crate::mem::transmute::<[MaybeUninit<U>; N], [U; N]>(dst) }
412
crate::mem::forget(guard);
413
// SAFETY: At this point we've properly initialized the whole array
414
- // and we just need to cast it to the correct type
+ // and we just need to cast it to the correct type.
415
unsafe { (&mut dst as *mut _ as *mut [U; N]).read() }
416
417
0 commit comments