File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 94
94
#![ feature( const_precise_live_drops) ]
95
95
#![ feature( const_ptr_offset) ]
96
96
#![ feature( const_ptr_offset_from) ]
97
+ #![ feature( const_ptr_read) ]
97
98
#![ feature( const_raw_ptr_comparison) ]
98
99
#![ feature( const_raw_ptr_deref) ]
99
100
#![ feature( const_slice_from_raw_parts) ]
Original file line number Diff line number Diff line change @@ -575,8 +575,9 @@ impl<T> MaybeUninit<T> {
575
575
/// // they both get dropped!
576
576
/// ```
577
577
#[ unstable( feature = "maybe_uninit_extra" , issue = "63567" ) ]
578
+ #[ rustc_const_unstable( feature = "maybe_uninit_extra" , issue = "63567" ) ]
578
579
#[ inline( always) ]
579
- pub unsafe fn assume_init_read ( & self ) -> T {
580
+ pub const unsafe fn assume_init_read ( & self ) -> T {
580
581
// SAFETY: the caller must guarantee that `self` is initialized.
581
582
// Reading from `self.as_ptr()` is safe since `self` should be initialized.
582
583
unsafe {
You can’t perform that action at this time.
0 commit comments