Skip to content

Commit 584d61a

Browse files
committed
hir: remove trait_auto_impl
1 parent 9151eab commit 584d61a

File tree

4 files changed

+0
-17
lines changed

4 files changed

+0
-17
lines changed

src/librustc/hir/lowering.rs

-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pub struct LoweringContext<'a> {
9090
exported_macros: Vec<hir::MacroDef>,
9191

9292
trait_impls: BTreeMap<DefId, Vec<hir::HirId>>,
93-
trait_auto_impl: BTreeMap<DefId, NodeId>,
9493

9594
modules: BTreeMap<NodeId, hir::ModuleItems>,
9695

@@ -233,7 +232,6 @@ pub fn lower_crate(
233232
impl_items: BTreeMap::new(),
234233
bodies: BTreeMap::new(),
235234
trait_impls: BTreeMap::new(),
236-
trait_auto_impl: BTreeMap::new(),
237235
modules: BTreeMap::new(),
238236
exported_macros: Vec::new(),
239237
catch_scopes: Vec::new(),
@@ -514,7 +512,6 @@ impl<'a> LoweringContext<'a> {
514512
bodies: self.bodies,
515513
body_ids,
516514
trait_impls: self.trait_impls,
517-
trait_auto_impl: self.trait_auto_impl,
518515
modules: self.modules,
519516
}
520517
}

src/librustc/hir/map/collector.rs

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
121121
impl_items: _,
122122
bodies: _,
123123
trait_impls: _,
124-
trait_auto_impl: _,
125124
body_ids: _,
126125
modules: _,
127126
} = *krate;

src/librustc/hir/map/mod.rs

-12
Original file line numberDiff line numberDiff line change
@@ -563,18 +563,6 @@ impl<'hir> Map<'hir> {
563563
self.forest.krate.trait_impls.get(&trait_did).map_or(&[], |xs| &xs[..])
564564
}
565565

566-
pub fn trait_auto_impl(&self, trait_did: DefId) -> Option<NodeId> {
567-
self.dep_graph.read(DepNode::new_no_params(DepKind::AllLocalTraitImpls));
568-
569-
// N.B., intentionally bypass `self.forest.krate()` so that we
570-
// do not trigger a read of the whole krate here
571-
self.forest.krate.trait_auto_impl.get(&trait_did).cloned()
572-
}
573-
574-
pub fn trait_is_auto(&self, trait_did: DefId) -> bool {
575-
self.trait_auto_impl(trait_did).is_some()
576-
}
577-
578566
/// Gets the attributes on the crate. This is preferable to
579567
/// invoking `krate.attrs` because it registers a tighter
580568
/// dep-graph access.

src/librustc/hir/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,6 @@ pub struct Crate {
724724
pub impl_items: BTreeMap<ImplItemId, ImplItem>,
725725
pub bodies: BTreeMap<BodyId, Body>,
726726
pub trait_impls: BTreeMap<DefId, Vec<HirId>>,
727-
pub trait_auto_impl: BTreeMap<DefId, NodeId>,
728727

729728
/// A list of the body ids written out in the order in which they
730729
/// appear in the crate. If you're going to process all the bodies

0 commit comments

Comments
 (0)