]> git.lizzy.rs Git - rust.git/commitdiff
Update `find_entry`
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Fri, 7 Feb 2020 18:17:48 +0000 (19:17 +0100)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Sat, 14 Mar 2020 21:52:29 +0000 (22:52 +0100)
src/librustc/hir/map/mod.rs

index 9d88e78afa785da7632d7c08c42eb157a741f1fc..52bdc6a14757da65567c313ec0debcddb4e0629b 100644 (file)
@@ -400,7 +400,7 @@ pub fn def_kind(&self, hir_id: HirId) -> Option<DefKind> {
     }
 
     fn find_entry(&self, id: HirId) -> Option<Entry<'hir>> {
-        self.lookup(id).cloned()
+        Some(self.get_entry(id))
     }
 
     fn get_entry(&self, id: HirId) -> Entry<'hir> {