From 4e4569cf4b5f044b030f9a3de61e4167395c5145 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 25 Dec 2018 13:26:40 +0100 Subject: [PATCH] fix build and tests with latest nightly --- src/operator.rs | 6 ++++-- tests/run-pass/async-fn.rs | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/operator.rs b/src/operator.rs index e1ccdf91995e..abc1c98a1ded 100644 --- a/src/operator.rs +++ b/src/operator.rs @@ -161,12 +161,14 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, ' if bits == 0 { // Test if the ptr is in-bounds. Then it cannot be NULL. // Even dangling pointers cannot be NULL. - if self.memory().check_bounds_ptr_maybe_dead(ptr).is_ok() { + if self.memory().check_bounds_ptr(ptr, InboundsCheck::MaybeDead).is_ok() { return Ok(false); } } - let (alloc_size, alloc_align) = self.memory().get_size_and_align(ptr.alloc_id); + let (alloc_size, alloc_align) = self.memory() + .get_size_and_align(ptr.alloc_id, InboundsCheck::MaybeDead) + .expect("determining size+align of dead ptr cannot fail"); // Case II: Alignment gives it away if ptr.offset.bytes() % alloc_align.bytes() == 0 { diff --git a/tests/run-pass/async-fn.rs b/tests/run-pass/async-fn.rs index 7c32b026df67..9094a9fd3a68 100644 --- a/tests/run-pass/async-fn.rs +++ b/tests/run-pass/async-fn.rs @@ -2,7 +2,6 @@ async_await, await_macro, futures_api, - pin, )] use std::{future::Future, pin::Pin, task::Poll};