CTFE: move target_{i, u}size_{min, max) to rustc_abi::TargetDataLayout

This commit is contained in:
Moulins
2023-07-01 23:54:06 +02:00
parent bf2f8ff2ec
commit 39cfe70e4f
8 changed files with 37 additions and 49 deletions

View File

@@ -1244,7 +1244,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
if offset > size.bytes() {
// If the pointer is out-of-bounds, we do not have a
// meaningful range to return.
0..=dl.max_address()
0..=dl.target_usize_max()
} else {
let (min, max) = dl.address_range_for(size, align);
(min + offset)..=(max + offset)