cleanup: don't use node_to_hir_id where unneeded

This commit is contained in:
ljedrz 2019-02-03 08:51:50 +01:00
parent ec7ecb3076
commit 28fec683f5
7 changed files with 10 additions and 17 deletions

View file

@ -1210,8 +1210,7 @@ impl Lifetime {
impl Clean<Lifetime> for hir::Lifetime {
fn clean(&self, cx: &DocContext) -> Lifetime {
if self.id != ast::DUMMY_NODE_ID {
let hir_id = cx.tcx.hir().node_to_hir_id(self.id);
let def = cx.tcx.named_region(hir_id);
let def = cx.tcx.named_region(self.hir_id);
match def {
Some(rl::Region::EarlyBound(_, node_id, _)) |
Some(rl::Region::LateBound(_, node_id, _)) |