Auto merge of #89266 - cjgillot:session-ich, r=michaelwoerister

Move ICH to rustc_query_system

Based on https://github.com/rust-lang/rust/pull/89183

The StableHashingContext does not need to be in rustc_middle.

This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in https://github.com/rust-lang/rust/pull/89124.
This commit is contained in:
bors 2021-10-05 09:45:11 +00:00
commit 55111d656f
77 changed files with 168 additions and 221 deletions

View file

@ -1,7 +1,7 @@
use crate::ich::StableHashingContext;
use crate::ty::{self, TyCtxt};
use rustc_data_structures::profiling::SelfProfilerRef;
use rustc_data_structures::sync::Lock;
use rustc_query_system::ich::StableHashingContext;
use rustc_session::Session;
#[macro_use]
@ -90,10 +90,9 @@ impl rustc_query_system::dep_graph::DepKind for DepKind {
impl<'tcx> DepContext for TyCtxt<'tcx> {
type DepKind = DepKind;
type StableHashingContext = StableHashingContext<'tcx>;
#[inline]
fn create_stable_hashing_context(&self) -> Self::StableHashingContext {
fn create_stable_hashing_context(&self) -> StableHashingContext<'_> {
TyCtxt::create_stable_hashing_context(*self)
}