Skip to main content

is_align_offset

Function is_align_offset 

Source
pub fn is_align_offset(tcx: TyCtxt<'_>, did: DefId) -> bool
Expand description

Identify *const T::align_offset and *mut T::align_offset for their call effect, which takes priority over expanding their available MIR. Their internal helper has costly branches and symbolic bitwise arithmetic: expanding it is much slower, and the VM loses the guarantee that a result other than usize::MAX aligns ptr + offset * size_of::<T>(). Modeling the bitwise operations exactly also makes branch solving time out.