about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2020-03-24 20:09:06 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2020-03-26 09:40:51 +0100
commitb6033fca02d87955ac7f391cdcbeb4707d2c8f02 (patch)
tree2079c0a46f8e313b5b0e5b063ff3b0dfaa4aa26a /src/librustc
parent228ca8ef0a2087d5000aa28f821f31c0d675be1f (diff)
Retire DepGraphSafe and HashStableContext.
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/dep_graph/mod.rs17
-rw-r--r--src/librustc/dep_graph/safe.rs9
-rw-r--r--src/librustc/ich/hcx.rs2
3 files changed, 0 insertions, 28 deletions
diff --git a/src/librustc/dep_graph/mod.rs b/src/librustc/dep_graph/mod.rs
index 4d9d439c526..de94b6b1850 100644
--- a/src/librustc/dep_graph/mod.rs
+++ b/src/librustc/dep_graph/mod.rs
@@ -8,7 +8,6 @@ use rustc_errors::Diagnostic;
 use rustc_hir::def_id::DefId;
 
 mod dep_node;
-mod safe;
 
 pub(crate) use rustc_query_system::dep_graph::DepNodeParams;
 pub use rustc_query_system::dep_graph::{
@@ -17,8 +16,6 @@ pub use rustc_query_system::dep_graph::{
 };
 
 pub use dep_node::{label_strs, DepConstructor, DepKind, DepNode, DepNodeExt};
-pub use safe::AssertDepGraphSafe;
-pub use safe::DepGraphSafe;
 
 pub type DepGraph = rustc_query_system::dep_graph::DepGraph<DepKind>;
 pub type TaskDeps = rustc_query_system::dep_graph::TaskDeps<DepKind>;
@@ -189,17 +186,3 @@ impl rustc_query_system::HashStableContext for StableHashingContext<'_> {
         self.sess().opts.debugging_opts.dep_tasks
     }
 }
-
-impl rustc_query_system::HashStableContextProvider<StableHashingContext<'tcx>> for TyCtxt<'tcx> {
-    fn get_stable_hashing_context(&self) -> StableHashingContext<'tcx> {
-        self.create_stable_hashing_context()
-    }
-}
-
-impl rustc_query_system::HashStableContextProvider<StableHashingContext<'a>>
-    for StableHashingContext<'a>
-{
-    fn get_stable_hashing_context(&self) -> Self {
-        self.clone()
-    }
-}
diff --git a/src/librustc/dep_graph/safe.rs b/src/librustc/dep_graph/safe.rs
deleted file mode 100644
index 47a1c09672f..00000000000
--- a/src/librustc/dep_graph/safe.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//! The `DepGraphSafe` trait
-
-use crate::ty::TyCtxt;
-
-pub use rustc_query_system::dep_graph::{AssertDepGraphSafe, DepGraphSafe};
-
-/// The type context itself can be used to access all kinds of tracked
-/// state, but those accesses should always generate read events.
-impl<'tcx> DepGraphSafe for TyCtxt<'tcx> {}
diff --git a/src/librustc/ich/hcx.rs b/src/librustc/ich/hcx.rs
index a9466e8252d..ac3faae072b 100644
--- a/src/librustc/ich/hcx.rs
+++ b/src/librustc/ich/hcx.rs
@@ -194,8 +194,6 @@ impl<'a> StableHashingContextProvider<'a> for StableHashingContext<'a> {
     }
 }
 
-impl<'a> crate::dep_graph::DepGraphSafe for StableHashingContext<'a> {}
-
 impl<'a> HashStable<StableHashingContext<'a>> for ast::NodeId {
     fn hash_stable(&self, _: &mut StableHashingContext<'a>, _: &mut StableHasher) {
         panic!("Node IDs should not appear in incremental state");