From 50510e4491ea8225c3abe997fe27f0c53e0094e2 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 5 Jul 2019 08:44:16 +0200 Subject: [PATCH] remove Scalar::is_null_ptr Miri does not need it any more and it is otherwise unused --- src/librustc/mir/interpret/value.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs index 388c549324268..867565d5e0922 100644 --- a/src/librustc/mir/interpret/value.rs +++ b/src/librustc/mir/interpret/value.rs @@ -275,17 +275,6 @@ impl<'tcx, Tag> Scalar { } } - #[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 }