all queries use dep nodes
This commit is contained in:
parent
8305394b4c
commit
4d7c0b68cf
2 changed files with 9 additions and 7 deletions
|
|
@ -154,6 +154,9 @@ pub enum DepNode<D: Clone + Debug> {
|
|||
DefSpan(D),
|
||||
Stability(D),
|
||||
Deprecation(D),
|
||||
ItemBodyNestedBodies(D),
|
||||
ConstIsRvaluePromotableToStatic(D),
|
||||
IsMirAvailable(D),
|
||||
}
|
||||
|
||||
impl<D: Clone + Debug> DepNode<D> {
|
||||
|
|
@ -264,6 +267,9 @@ impl<D: Clone + Debug> DepNode<D> {
|
|||
DefSpan(ref d) => op(d).map(DefSpan),
|
||||
Stability(ref d) => op(d).map(Stability),
|
||||
Deprecation(ref d) => op(d).map(Deprecation),
|
||||
ItemBodyNestedBodies(ref d) => op(d).map(ItemBodyNestedBodies),
|
||||
ConstIsRvaluePromotableToStatic(ref d) => op(d).map(ConstIsRvaluePromotableToStatic),
|
||||
IsMirAvailable(ref d) => op(d).map(IsMirAvailable),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -783,9 +783,9 @@ define_maps! { <'tcx>
|
|||
[] def_span: DefSpan(DefId) -> Span,
|
||||
[] stability: Stability(DefId) -> Option<attr::Stability>,
|
||||
[] deprecation: Deprecation(DefId) -> Option<attr::Deprecation>,
|
||||
[] item_body_nested_bodies: metadata_dep_node(DefId) -> Rc<BTreeMap<hir::BodyId, hir::Body>>,
|
||||
[] const_is_rvalue_promotable_to_static: metadata_dep_node(DefId) -> bool,
|
||||
[] is_mir_available: metadata_dep_node(DefId) -> bool,
|
||||
[] item_body_nested_bodies: ItemBodyNestedBodies(DefId) -> Rc<BTreeMap<hir::BodyId, hir::Body>>,
|
||||
[] const_is_rvalue_promotable_to_static: ConstIsRvaluePromotableToStatic(DefId) -> bool,
|
||||
[] is_mir_available: IsMirAvailable(DefId) -> bool,
|
||||
}
|
||||
|
||||
fn coherent_trait_dep_node((_, def_id): (CrateNum, DefId)) -> DepNode<DefId> {
|
||||
|
|
@ -800,10 +800,6 @@ fn reachability_dep_node(_: CrateNum) -> DepNode<DefId> {
|
|||
DepNode::Reachability
|
||||
}
|
||||
|
||||
fn metadata_dep_node(def_id: DefId) -> DepNode<DefId> {
|
||||
DepNode::MetaData(def_id)
|
||||
}
|
||||
|
||||
fn mir_shim_dep_node(instance: ty::InstanceDef) -> DepNode<DefId> {
|
||||
instance.dep_node()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue