Skip to content

Commit

Permalink
Make all hir::Map methods consistently by-value
Browse files Browse the repository at this point in the history
(hir::Map only consists of a single reference anyways)
  • Loading branch information
steffahn committed Feb 10, 2022
1 parent 5d6ee0d commit 89ac81a
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 84 deletions.
12 changes: 6 additions & 6 deletions compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,22 @@ pub trait Map<'hir> {
// Used when no map is actually available, forcing manual implementation of nested visitors.
impl<'hir> Map<'hir> for ! {
fn find(&self, _: HirId) -> Option<Node<'hir>> {
unreachable!()
*self;
}
fn body(&self, _: BodyId) -> &'hir Body<'hir> {
unreachable!()
*self;
}
fn item(&self, _: ItemId) -> &'hir Item<'hir> {
unreachable!()
*self;
}
fn trait_item(&self, _: TraitItemId) -> &'hir TraitItem<'hir> {
unreachable!()
*self;
}
fn impl_item(&self, _: ImplItemId) -> &'hir ImplItem<'hir> {
unreachable!()
*self;
}
fn foreign_item(&self, _: ForeignItemId) -> &'hir ForeignItem<'hir> {
unreachable!()
*self;
}
}

Expand Down
Loading

0 comments on commit 89ac81a

Please sign in to comment.