Skip to content

Commit

Permalink
use machine_ prefix for target usize/isize
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 28, 2020
1 parent 8bad484 commit 01dbaed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/mir/interpret/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ pub trait PointerArithmetic: layout::HasDataLayout {
}

#[inline]
fn usize_max(&self) -> u64 {
fn machine_usize_max(&self) -> u64 {
let max_usize_plus_1 = 1u128 << self.pointer_size().bits();
u64::try_from(max_usize_plus_1 - 1).unwrap()
}

#[inline]
fn isize_max(&self) -> i64 {
fn machine_isize_max(&self) -> i64 {
let max_isize_plus_1 = 1u128 << (self.pointer_size().bits() - 1);
i64::try_from(max_isize_plus_1 - 1).unwrap()
}
Expand Down

0 comments on commit 01dbaed

Please sign in to comment.