Skip to content

Commit 08e7a84

Browse files
committed
remove another unused method
1 parent 1938edb commit 08e7a84

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/librustc/mir/interpret/value.rs

-13
Original file line numberDiff line numberDiff line change
@@ -262,19 +262,6 @@ impl<'tcx, Tag> Scalar<Tag> {
262262
}
263263
}
264264

265-
/// Returns this pointer's offset from the allocation base, or from NULL (for
266-
/// integer pointers).
267-
#[inline]
268-
pub fn get_ptr_offset(self, cx: &impl HasDataLayout) -> Size {
269-
match self {
270-
Scalar::Raw { data, size } => {
271-
assert_eq!(size as u64, cx.pointer_size().bytes());
272-
Size::from_bytes(data as u64)
273-
}
274-
Scalar::Ptr(ptr) => ptr.offset,
275-
}
276-
}
277-
278265
#[inline]
279266
pub fn from_bool(b: bool) -> Self {
280267
Scalar::Raw { data: b as u128, size: 1 }

0 commit comments

Comments
 (0)