]> git.lizzy.rs Git - rust.git/blobdiff - src/intptrcast.rs
Auto merge of #1721 - henryboisdequin:add-atomic-min-and-max, r=oli-obk
[rust.git] / src / intptrcast.rs
index f51c8a7ce7439e0864f8fd3e4aefa0c8c8a7e785..188ff94861bdd194a223f092f5c24149c276b725 100644 (file)
@@ -6,10 +6,9 @@
 use rand::Rng;
 
 use rustc_data_structures::fx::FxHashMap;
-use rustc_mir::interpret::{AllocCheck, AllocId, InterpResult, Memory, Machine, Pointer, PointerArithmetic};
 use rustc_target::abi::{Size, HasDataLayout};
 
-use crate::{Evaluator, Tag, STACK_ADDR, CheckInAllocMsg};
+use crate::*;
 
 pub type MemoryExtra = RefCell<GlobalState>;
 
@@ -79,7 +78,7 @@ pub fn ptr_to_int(
     ) -> InterpResult<'tcx, u64> {
         let mut global_state = memory.extra.intptrcast.borrow_mut();
         let global_state = &mut *global_state;
-        let id = Evaluator::canonical_alloc_id(memory, ptr.alloc_id);
+        let id = ptr.alloc_id;
 
         // There is nothing wrong with a raw pointer being cast to an integer only after
         // it became dangling.  Hence `MaybeDead`.