From f8b774f1cf74e5aed4ff6b5f63e91f6528258add Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 3 Jul 2017 16:37:48 +0200 Subject: [PATCH] Deduplicate DepNode::ConstEval() --- src/librustc/dep_graph/dep_node.rs | 5 +++-- src/librustc/ty/maps.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index 1c30a19d2d9..b2f6ed96b80 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -64,8 +64,9 @@ use hir::map::DefPathHash; use ich::Fingerprint; -use ty::fast_reject::SimplifiedType; use ty::{TyCtxt, Instance, InstanceDef}; +use ty::fast_reject::SimplifiedType; +use ty::subst::Substs; use rustc_data_structures::stable_hasher::{StableHasher, HashStable}; use ich::StableHashingContext; use std::fmt; @@ -420,7 +421,7 @@ pub fn to_dep_node(self, tcx: TyCtxt, kind: DepKind) -> DepNode { TypeckBodiesKrate, TypeckTables(DefId), HasTypeckTables(DefId), - ConstEval(DefId), + ConstEval { def_id: DefId, substs: &'tcx Substs<'tcx> }, SymbolName(DefId), InstanceSymbolName { instance: Instance<'tcx> }, SpecializationGraph(DefId), diff --git a/src/librustc/ty/maps.rs b/src/librustc/ty/maps.rs index 2b91b13d725..94801d55451 100644 --- a/src/librustc/ty/maps.rs +++ b/src/librustc/ty/maps.rs @@ -1011,8 +1011,8 @@ fn typeck_item_bodies_dep_node<'tcx>(_: CrateNum) -> DepConstructor<'tcx> { DepConstructor::TypeckBodiesKrate } -fn const_eval_dep_node<'tcx>((def_id, _): (DefId, &Substs)) -> DepConstructor<'tcx> { - DepConstructor::ConstEval(def_id) +fn const_eval_dep_node<'tcx>((def_id, substs): (DefId, &'tcx Substs<'tcx>)) -> DepConstructor<'tcx> { + DepConstructor::ConstEval { def_id, substs } } fn mir_keys<'tcx>(_: CrateNum) -> DepConstructor<'tcx> { -- GitLab