]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_typeck/src/check/method/prelude2021.rs
New upstream version 1.59.0+dfsg1
[rustc.git] / compiler / rustc_typeck / src / check / method / prelude2021.rs
index 5c8056b244242343791656967f54d2cd9a92f61a..bc2859719e8ebb66a16e586bed3a4f742ec4d980 100644 (file)
@@ -345,10 +345,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         let import_items: Vec<_> = applicable_trait
             .import_ids
             .iter()
-            .map(|&import_id| {
-                let hir_id = self.tcx.hir().local_def_id_to_hir_id(import_id);
-                self.tcx.hir().expect_item(hir_id)
-            })
+            .map(|&import_id| self.tcx.hir().expect_item(import_id))
             .collect();
 
         // Find an identifier with which this trait was imported (note that `_` doesn't count).