From 49e52e71de644e3497d32854838e3b99e28ee7c3 Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sat, 29 Dec 2018 11:55:00 +0000 Subject: [PATCH] Remove unused types from rustc::mir::interpret The types are no longer used with the change to stacked borrows for validation. --- src/librustc/ich/impls_ty.rs | 16 ---------------- src/librustc/mir/interpret/mod.rs | 22 ---------------------- 2 files changed, 38 deletions(-) diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index 65b8f04e30a1..bab3846fe86e 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -473,22 +473,6 @@ impl_stable_hash_for!(enum mir::interpret::InboundsCheck { MaybeDead }); -impl_stable_hash_for!(enum mir::interpret::Lock { - NoLock, - WriteLock(dl), - ReadLock(v) -}); - -impl_stable_hash_for!(struct mir::interpret::DynamicLifetime { - frame, - region -}); - -impl_stable_hash_for!(enum mir::interpret::AccessKind { - Read, - Write -}); - impl_stable_hash_for!(enum ty::Variance { Covariant, Invariant, diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc/mir/interpret/mod.rs index 25a0f0ba489d..e6a560b2ad7b 100644 --- a/src/librustc/mir/interpret/mod.rs +++ b/src/librustc/mir/interpret/mod.rs @@ -29,7 +29,6 @@ use mir; use hir::def_id::DefId; use ty::{self, TyCtxt, Instance}; use ty::layout::{self, Size}; -use middle::region; use std::io; use rustc_serialize::{Encoder, Decodable, Encodable}; use rustc_data_structures::fx::FxHashMap; @@ -40,27 +39,6 @@ use ty::codec::TyDecoder; use std::sync::atomic::{AtomicU32, Ordering}; use std::num::NonZeroU32; -#[derive(Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)] -pub enum Lock { - NoLock, - WriteLock(DynamicLifetime), - /// This should never be empty -- that would be a read lock held and nobody - /// there to release it... - ReadLock(Vec), -} - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)] -pub struct DynamicLifetime { - pub frame: usize, - pub region: Option, // "None" indicates "until the function ends" -} - -#[derive(Copy, Clone, Debug, PartialEq, Eq, RustcEncodable, RustcDecodable)] -pub enum AccessKind { - Read, - Write, -} - /// Uniquely identifies a specific constant or static. #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, RustcEncodable, RustcDecodable)] pub struct GlobalId<'tcx> {