]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_symbol_mangling/src/lib.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / compiler / rustc_symbol_mangling / src / lib.rs
index 1f38240ee41461b4832d92b2156ae01112b0a584..f4d1f41902aff11802bb176b86720073c33822b1 100644 (file)
@@ -91,6 +91,7 @@
 #![feature(never_type)]
 #![feature(nll)]
 #![recursion_limit = "256"]
+#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
 
 #[macro_use]
 extern crate rustc_middle;
@@ -173,8 +174,7 @@ fn compute_symbol_name<'tcx>(
             let stable_crate_id = tcx.sess.local_stable_crate_id();
             return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id);
         }
-        let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
-        matches!(tcx.hir().get(hir_id), Node::ForeignItem(_))
+        matches!(tcx.hir().get_by_def_id(def_id), Node::ForeignItem(_))
     } else {
         tcx.is_foreign_item(def_id)
     };