]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/clean/mod.rs
rustc: Hide the `named_region_map` behind queries
[rust.git] / src / librustdoc / clean / mod.rs
index aab44ddce0e6af711a15d6c6e5c68f0b0df8cead..f446bf587bdcd0c30f904f351a789c13773638a1 100644 (file)
@@ -830,7 +830,8 @@ pub fn statik() -> Lifetime {
 
 impl Clean<Lifetime> for hir::Lifetime {
     fn clean(&self, cx: &DocContext) -> Lifetime {
-        let def = cx.tcx.named_region_map.defs.get(&self.id).cloned();
+        let hir_id = cx.tcx.hir.node_to_hir_id(self.id);
+        let def = cx.tcx.named_region(hir_id);
         match def {
             Some(rl::Region::EarlyBound(_, node_id)) |
             Some(rl::Region::LateBound(_, node_id)) |