Commit f6faf0b 1 parent 8f5f8f9 commit f6faf0b Copy full SHA for f6faf0b
File tree 2 files changed +3
-4
lines changed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 71
71
#![ feature( cfg_target_has_atomic) ]
72
72
#![ feature( concat_idents) ]
73
73
#![ feature( const_fn) ]
74
+ #![ feature( const_if_match) ]
75
+ #![ feature( const_panic) ]
74
76
#![ feature( const_fn_union) ]
75
77
#![ feature( const_generics) ]
76
78
#![ feature( const_ptr_offset_from) ]
Original file line number Diff line number Diff line change @@ -288,10 +288,7 @@ impl<T: ?Sized> *const T {
288
288
T : Sized ,
289
289
{
290
290
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 ) ;
295
292
intrinsics:: ptr_offset_from ( self , origin)
296
293
}
297
294
You can’t perform that action at this time.
0 commit comments