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> {
224224 // will always result in an aligned header pointer, it just may not point to the
225225 // beginning of the allocation.
226226 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 ( ) ) ;
228228 hp
229229 }
230230
Original file line number Diff line number Diff line change 168168#![ feature( nll) ] // Not necessary, but here to test the `nll` feature.
169169#![ feature( rustc_allow_const_fn_unstable) ]
170170#![ feature( rustc_attrs) ]
171+ #![ feature( pointer_is_aligned) ]
171172#![ feature( slice_internals) ]
172173#![ feature( staged_api) ]
173174#![ cfg_attr( test, feature( test) ) ]
You can’t perform that action at this time.
0 commit comments