remove some uses of visit_all_item_likes in incremental, metadata and interface crates
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
parent
b73b4de982
commit
0baf85e8b6
6 changed files with 64 additions and 7 deletions
|
@ -45,6 +45,21 @@ pub struct ModuleItems {
|
|||
foreign_items: Box<[ForeignItemId]>,
|
||||
}
|
||||
|
||||
impl ModuleItems {
|
||||
pub fn items(&self) -> impl Iterator<Item = ItemId> {
|
||||
self.items.to_vec().into_iter()
|
||||
}
|
||||
pub fn trait_items(&self) -> impl Iterator<Item = TraitItemId> {
|
||||
self.trait_items.to_vec().into_iter()
|
||||
}
|
||||
pub fn impl_items(&self) -> impl Iterator<Item = ImplItemId> {
|
||||
self.impl_items.to_vec().into_iter()
|
||||
}
|
||||
pub fn foreign_items(&self) -> impl Iterator<Item = ForeignItemId> {
|
||||
self.foreign_items.to_vec().into_iter()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> TyCtxt<'tcx> {
|
||||
#[inline(always)]
|
||||
pub fn hir(self) -> map::Map<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue