Skip to content

Commit f8b774f

Browse files
Deduplicate DepNode::ConstEval()
1 parent e00bec2 commit f8b774f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/librustc/dep_graph/dep_node.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ use hir::def_id::{CrateNum, DefId};
6464
use hir::map::DefPathHash;
6565

6666
use ich::Fingerprint;
67-
use ty::fast_reject::SimplifiedType;
6867
use ty::{TyCtxt, Instance, InstanceDef};
68+
use ty::fast_reject::SimplifiedType;
69+
use ty::subst::Substs;
6970
use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
7071
use ich::StableHashingContext;
7172
use std::fmt;
@@ -420,7 +421,7 @@ define_dep_nodes!( <'tcx>
420421
TypeckBodiesKrate,
421422
TypeckTables(DefId),
422423
HasTypeckTables(DefId),
423-
ConstEval(DefId),
424+
ConstEval { def_id: DefId, substs: &'tcx Substs<'tcx> },
424425
SymbolName(DefId),
425426
InstanceSymbolName { instance: Instance<'tcx> },
426427
SpecializationGraph(DefId),

src/librustc/ty/maps.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,8 @@ fn typeck_item_bodies_dep_node<'tcx>(_: CrateNum) -> DepConstructor<'tcx> {
10111011
DepConstructor::TypeckBodiesKrate
10121012
}
10131013

1014-
fn const_eval_dep_node<'tcx>((def_id, _): (DefId, &Substs)) -> DepConstructor<'tcx> {
1015-
DepConstructor::ConstEval(def_id)
1014+
fn const_eval_dep_node<'tcx>((def_id, substs): (DefId, &'tcx Substs<'tcx>)) -> DepConstructor<'tcx> {
1015+
DepConstructor::ConstEval { def_id, substs }
10161016
}
10171017

10181018
fn mir_keys<'tcx>(_: CrateNum) -> DepConstructor<'tcx> {

0 commit comments

Comments
 (0)