Skip to content

Commit 00a0b6a

Browse files
committed
Move FlagComputation to rustc_type_ir
1 parent 9ffde4b commit 00a0b6a

File tree

7 files changed

+395
-370
lines changed

7 files changed

+395
-370
lines changed

Diff for: compiler/rustc_middle/src/ty/context.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ impl<'tcx> CtxtInterners<'tcx> {
870870
Ty(Interned::new_unchecked(
871871
self.type_
872872
.intern(kind, |kind| {
873-
let flags = super::flags::FlagComputation::for_kind(&kind);
873+
let flags = ty::FlagComputation::<TyCtxt<'tcx>>::for_kind(&kind);
874874
let stable_hash = self.stable_hash(&flags, sess, untracked, &kind);
875875

876876
InternedInSet(self.arena.alloc(WithCachedTypeInfo {
@@ -896,7 +896,7 @@ impl<'tcx> CtxtInterners<'tcx> {
896896
Const(Interned::new_unchecked(
897897
self.const_
898898
.intern(kind, |kind: ty::ConstKind<'_>| {
899-
let flags = super::flags::FlagComputation::for_const_kind(&kind);
899+
let flags = ty::FlagComputation::<TyCtxt<'tcx>>::for_const_kind(&kind);
900900
let stable_hash = self.stable_hash(&flags, sess, untracked, &kind);
901901

902902
InternedInSet(self.arena.alloc(WithCachedTypeInfo {
@@ -912,7 +912,7 @@ impl<'tcx> CtxtInterners<'tcx> {
912912

913913
fn stable_hash<'a, T: HashStable<StableHashingContext<'a>>>(
914914
&self,
915-
flags: &ty::flags::FlagComputation,
915+
flags: &ty::FlagComputation<TyCtxt<'tcx>>,
916916
sess: &'a Session,
917917
untracked: &'a Untracked,
918918
val: &T,
@@ -940,7 +940,7 @@ impl<'tcx> CtxtInterners<'tcx> {
940940
Predicate(Interned::new_unchecked(
941941
self.predicate
942942
.intern(kind, |kind| {
943-
let flags = super::flags::FlagComputation::for_predicate(kind);
943+
let flags = ty::FlagComputation::<TyCtxt<'tcx>>::for_predicate(kind);
944944

945945
let stable_hash = self.stable_hash(&flags, sess, untracked, &kind);
946946

@@ -961,7 +961,7 @@ impl<'tcx> CtxtInterners<'tcx> {
961961
} else {
962962
self.clauses
963963
.intern_ref(clauses, || {
964-
let flags = super::flags::FlagComputation::for_clauses(clauses);
964+
let flags = ty::FlagComputation::<TyCtxt<'tcx>>::for_clauses(clauses);
965965

966966
InternedInSet(ListWithCachedTypeInfo::from_arena(
967967
&*self.arena,

0 commit comments

Comments
 (0)