We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1938edb commit 08e7a84Copy full SHA for 08e7a84
src/librustc/mir/interpret/value.rs
@@ -262,19 +262,6 @@ impl<'tcx, Tag> Scalar<Tag> {
262
}
263
264
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
-
278
#[inline]
279
pub fn from_bool(b: bool) -> Self {
280
Scalar::Raw { data: b as u128, size: 1 }
0 commit comments