File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 217
217
#![ feature( unboxed_closures) ]
218
218
#![ feature( unsized_fn_params) ]
219
219
#![ feature( asm_const) ]
220
+ #![ feature( const_transmute_copy) ]
220
221
//
221
222
// Target features:
222
223
#![ feature( arm_target_feature) ]
Original file line number Diff line number Diff line change @@ -1297,7 +1297,8 @@ impl<T, const N: usize> MaybeUninit<[T; N]> {
1297
1297
/// let data: [MaybeUninit<u8>; 1000] = MaybeUninit::uninit().transpose();
1298
1298
/// ```
1299
1299
#[ unstable( feature = "maybe_uninit_uninit_array_transpose" , issue = "96097" ) ]
1300
- pub fn transpose ( self ) -> [ MaybeUninit < T > ; N ] {
1300
+ #[ inline]
1301
+ pub const fn transpose ( self ) -> [ MaybeUninit < T > ; N ] {
1301
1302
// SAFETY: T and MaybeUninit<T> have the same layout
1302
1303
unsafe { super :: transmute_copy ( & ManuallyDrop :: new ( self ) ) }
1303
1304
}
@@ -1316,7 +1317,8 @@ impl<T, const N: usize> [MaybeUninit<T>; N] {
1316
1317
/// let data: MaybeUninit<[u8; 1000]> = data.transpose();
1317
1318
/// ```
1318
1319
#[ unstable( feature = "maybe_uninit_uninit_array_transpose" , issue = "96097" ) ]
1319
- pub fn transpose ( self ) -> MaybeUninit < [ T ; N ] > {
1320
+ #[ inline]
1321
+ pub const fn transpose ( self ) -> MaybeUninit < [ T ; N ] > {
1320
1322
// SAFETY: T and MaybeUninit<T> have the same layout
1321
1323
unsafe { super :: transmute_copy ( & ManuallyDrop :: new ( self ) ) }
1322
1324
}
You can’t perform that action at this time.
0 commit comments