about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-07-05 08:44:16 +0200
committerRalf Jung <post@ralfj.de>2019-07-05 08:44:19 +0200
commit50510e4491ea8225c3abe997fe27f0c53e0094e2 (patch)
treeff988d1004eb7b7f58e7e9d2bcf59885ea29a224
parent4ca7a349da6869286d94fd8159eb225629ffba5f (diff)
downloadrust-50510e4491ea8225c3abe997fe27f0c53e0094e2.tar.gz
rust-50510e4491ea8225c3abe997fe27f0c53e0094e2.zip
remove Scalar::is_null_ptr
Miri does not need it any more and it is otherwise unused
-rw-r--r--src/librustc/mir/interpret/value.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs
index 388c5493242..867565d5e09 100644
--- a/src/librustc/mir/interpret/value.rs
+++ b/src/librustc/mir/interpret/value.rs
@@ -276,17 +276,6 @@ impl<'tcx, Tag> Scalar<Tag> {
     }
 
     #[inline]
-    pub fn is_null_ptr(self, cx: &impl HasDataLayout) -> bool {
-        match self {
-            Scalar::Raw { data, size } => {
-                assert_eq!(size as u64, cx.data_layout().pointer_size.bytes());
-                data == 0
-            },
-            Scalar::Ptr(_) => false,
-        }
-    }
-
-    #[inline]
     pub fn from_bool(b: bool) -> Self {
         Scalar::Raw { data: b as u128, size: 1 }
     }