about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/consts
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2021-07-14 22:10:17 +0200
committerRalf Jung <post@ralfj.de>2021-07-15 17:14:11 +0200
commitf4b61ba509e71710df5c14ac282fbdd512344072 (patch)
tree6508c060e035d2d3354447eb50a0a84371a6a5a4 /compiler/rustc_middle/src/ty/consts
parent8932aebfdfc8e4be18ed5213ba24f72954c7ba47 (diff)
downloadrust-f4b61ba509e71710df5c14ac282fbdd512344072.tar.gz
rust-f4b61ba509e71710df5c14ac282fbdd512344072.zip
adjustions and cleanup to make Miri build again
Diffstat (limited to 'compiler/rustc_middle/src/ty/consts')
-rw-r--r--compiler/rustc_middle/src/ty/consts/int.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler/rustc_middle/src/ty/consts/int.rs b/compiler/rustc_middle/src/ty/consts/int.rs
index 8ed8ea6a0bc..8262bc26199 100644
--- a/compiler/rustc_middle/src/ty/consts/int.rs
+++ b/compiler/rustc_middle/src/ty/consts/int.rs
@@ -1,7 +1,7 @@
 use rustc_apfloat::ieee::{Double, Single};
 use rustc_apfloat::Float;
 use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
-use rustc_target::abi::{Size, TargetDataLayout};
+use rustc_target::abi::Size;
 use std::convert::{TryFrom, TryInto};
 use std::fmt;
 
@@ -193,15 +193,6 @@ impl ScalarInt {
         self.data == 0
     }
 
-    pub(crate) fn ptr_sized_op<E>(
-        self,
-        dl: &TargetDataLayout,
-        f_int: impl FnOnce(u64) -> Result<u64, E>,
-    ) -> Result<Self, E> {
-        assert_eq!(u64::from(self.size), dl.pointer_size.bytes());
-        Ok(Self::try_from_uint(f_int(u64::try_from(self.data).unwrap())?, self.size()).unwrap())
-    }
-
     #[inline]
     pub fn try_from_uint(i: impl Into<u128>, size: Size) -> Option<Self> {
         let data = i.into();