Skip to content

Commit

Permalink
remove another unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 6, 2019
1 parent 1938edb commit 08e7a84
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/librustc/mir/interpret/value.rs
Expand Up @@ -262,19 +262,6 @@ impl<'tcx, Tag> Scalar<Tag> {
}
}

/// Returns this pointer's offset from the allocation base, or from NULL (for
/// integer pointers).
#[inline]
pub fn get_ptr_offset(self, cx: &impl HasDataLayout) -> Size {
match self {
Scalar::Raw { data, size } => {
assert_eq!(size as u64, cx.pointer_size().bytes());
Size::from_bytes(data as u64)
}
Scalar::Ptr(ptr) => ptr.offset,
}
}

#[inline]
pub fn from_bool(b: bool) -> Self {
Scalar::Raw { data: b as u128, size: 1 }
Expand Down

0 comments on commit 08e7a84

Please sign in to comment.