File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ impl<H> WithHeader<H> {
224
224
// will always result in an aligned header pointer, it just may not point to the
225
225
// beginning of the allocation.
226
226
let hp = unsafe { self . 0 . as_ptr ( ) . sub ( Self :: header_size ( ) ) as * mut H } ;
227
- debug_assert ! ( ( hp. addr ( ) & ( core :: mem :: align_of :: < H > ( ) - 1 ) ) == 0 ) ;
227
+ debug_assert ! ( hp. is_aligned ( ) ) ;
228
228
hp
229
229
}
230
230
Original file line number Diff line number Diff line change 168
168
#![ feature( nll) ] // Not necessary, but here to test the `nll` feature.
169
169
#![ feature( rustc_allow_const_fn_unstable) ]
170
170
#![ feature( rustc_attrs) ]
171
+ #![ feature( pointer_is_aligned) ]
171
172
#![ feature( slice_internals) ]
172
173
#![ feature( staged_api) ]
173
174
#![ cfg_attr( test, feature( test) ) ]
You can’t perform that action at this time.
0 commit comments