diff options
| author | Ralf Jung <post@ralfj.de> | 2019-07-06 13:09:00 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-07-06 13:09:00 +0200 |
| commit | 08e7a84354d1c829684dc11c7c4e7a0b5cf6f5b6 (patch) | |
| tree | a60e5daf043cfd1efcb40fd29017bfee65426644 | |
| parent | 1938edb4d96f2c442ca67ae13f130e3657d589d7 (diff) | |
| download | rust-08e7a84354d1c829684dc11c7c4e7a0b5cf6f5b6.tar.gz rust-08e7a84354d1c829684dc11c7c4e7a0b5cf6f5b6.zip | |
remove another unused method
| -rw-r--r-- | src/librustc/mir/interpret/value.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs index c9c1d3146e3..4a59d845b3b 100644 --- a/src/librustc/mir/interpret/value.rs +++ b/src/librustc/mir/interpret/value.rs @@ -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 } |
