File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 7171#![ feature( cfg_target_has_atomic) ]
7272#![ feature( concat_idents) ]
7373#![ feature( const_fn) ]
74+ #![ feature( const_if_match) ]
75+ #![ feature( const_panic) ]
7476#![ feature( const_fn_union) ]
7577#![ feature( const_generics) ]
7678#![ feature( const_ptr_offset_from) ]
Original file line number Diff line number Diff line change @@ -288,10 +288,7 @@ impl<T: ?Sized> *const T {
288288 T : Sized ,
289289 {
290290 let pointee_size = mem:: size_of :: < T > ( ) ;
291- let ok = 0 < pointee_size && pointee_size <= isize:: max_value ( ) as usize ;
292- // assert that the pointee size is valid in a const eval compatible way
293- // FIXME: do this with a real assert at some point
294- [ ( ) ] [ ( !ok) as usize ] ;
291+ assert ! ( 0 < pointee_size && pointee_size <= isize :: max_value( ) as usize ) ;
295292 intrinsics:: ptr_offset_from ( self , origin)
296293 }
297294
You can’t perform that action at this time.
0 commit comments