Skip to content

Commit 50510e4

Browse files
committed
remove Scalar::is_null_ptr
Miri does not need it any more and it is otherwise unused
1 parent 4ca7a34 commit 50510e4

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/librustc/mir/interpret/value.rs

-11
Original file line numberDiff line numberDiff line change
@@ -275,17 +275,6 @@ impl<'tcx, Tag> Scalar<Tag> {
275275
}
276276
}
277277

278-
#[inline]
279-
pub fn is_null_ptr(self, cx: &impl HasDataLayout) -> bool {
280-
match self {
281-
Scalar::Raw { data, size } => {
282-
assert_eq!(size as u64, cx.data_layout().pointer_size.bytes());
283-
data == 0
284-
},
285-
Scalar::Ptr(_) => false,
286-
}
287-
}
288-
289278
#[inline]
290279
pub fn from_bool(b: bool) -> Self {
291280
Scalar::Raw { data: b as u128, size: 1 }

0 commit comments

Comments
 (0)