hir: remove trait_auto_impl
This commit is contained in:
parent
9151eabf97
commit
584d61a2be
4 changed files with 0 additions and 17 deletions
|
|
@ -90,7 +90,6 @@ pub struct LoweringContext<'a> {
|
|||
exported_macros: Vec<hir::MacroDef>,
|
||||
|
||||
trait_impls: BTreeMap<DefId, Vec<hir::HirId>>,
|
||||
trait_auto_impl: BTreeMap<DefId, NodeId>,
|
||||
|
||||
modules: BTreeMap<NodeId, hir::ModuleItems>,
|
||||
|
||||
|
|
@ -233,7 +232,6 @@ pub fn lower_crate(
|
|||
impl_items: BTreeMap::new(),
|
||||
bodies: BTreeMap::new(),
|
||||
trait_impls: BTreeMap::new(),
|
||||
trait_auto_impl: BTreeMap::new(),
|
||||
modules: BTreeMap::new(),
|
||||
exported_macros: Vec::new(),
|
||||
catch_scopes: Vec::new(),
|
||||
|
|
@ -514,7 +512,6 @@ impl<'a> LoweringContext<'a> {
|
|||
bodies: self.bodies,
|
||||
body_ids,
|
||||
trait_impls: self.trait_impls,
|
||||
trait_auto_impl: self.trait_auto_impl,
|
||||
modules: self.modules,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
|
|||
impl_items: _,
|
||||
bodies: _,
|
||||
trait_impls: _,
|
||||
trait_auto_impl: _,
|
||||
body_ids: _,
|
||||
modules: _,
|
||||
} = *krate;
|
||||
|
|
|
|||
|
|
@ -563,18 +563,6 @@ impl<'hir> Map<'hir> {
|
|||
self.forest.krate.trait_impls.get(&trait_did).map_or(&[], |xs| &xs[..])
|
||||
}
|
||||
|
||||
pub fn trait_auto_impl(&self, trait_did: DefId) -> Option<NodeId> {
|
||||
self.dep_graph.read(DepNode::new_no_params(DepKind::AllLocalTraitImpls));
|
||||
|
||||
// N.B., intentionally bypass `self.forest.krate()` so that we
|
||||
// do not trigger a read of the whole krate here
|
||||
self.forest.krate.trait_auto_impl.get(&trait_did).cloned()
|
||||
}
|
||||
|
||||
pub fn trait_is_auto(&self, trait_did: DefId) -> bool {
|
||||
self.trait_auto_impl(trait_did).is_some()
|
||||
}
|
||||
|
||||
/// Gets the attributes on the crate. This is preferable to
|
||||
/// invoking `krate.attrs` because it registers a tighter
|
||||
/// dep-graph access.
|
||||
|
|
|
|||
|
|
@ -724,7 +724,6 @@ pub struct Crate {
|
|||
pub impl_items: BTreeMap<ImplItemId, ImplItem>,
|
||||
pub bodies: BTreeMap<BodyId, Body>,
|
||||
pub trait_impls: BTreeMap<DefId, Vec<HirId>>,
|
||||
pub trait_auto_impl: BTreeMap<DefId, NodeId>,
|
||||
|
||||
/// A list of the body ids written out in the order in which they
|
||||
/// appear in the crate. If you're going to process all the bodies
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue