remove another unused method
This commit is contained in:
parent
1938edb4d9
commit
08e7a84354
1 changed files with 0 additions and 13 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue