]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_passes/src/lang_items.rs
Rollup merge of #107100 - compiler-errors:issue-107087, r=lcnr
[rust.git] / compiler / rustc_passes / src / lang_items.rs
index 188efc528ef82361b6800fca4cb86a6956dd661a..9a40b847d8552ebd9800fa42f6a6791b17562f73 100644 (file)
@@ -83,7 +83,6 @@ fn collect_item(&mut self, lang_item: LangItem, item_def_id: DefId) {
                         .map(|p| p.display().to_string())
                         .collect::<Vec<_>>()
                         .join(", ")
-                        .into()
                 };
                 let first_defined_span = self.tcx.hir().span_if_local(original_def_id);
                 let mut orig_crate_name = Empty;
@@ -98,7 +97,6 @@ fn collect_item(&mut self, lang_item: LangItem, item_def_id: DefId) {
                         .map(|p| p.display().to_string())
                         .collect::<Vec<_>>()
                         .join(", ")
-                        .into()
                 };
                 if first_defined_span.is_none() {
                     orig_crate_name = self.tcx.crate_name(original_def_id.krate);
@@ -219,7 +217,7 @@ fn get_lang_items(tcx: TyCtxt<'_>, (): ()) -> LanguageItems {
             let item = tcx.hir().item(id);
             if let hir::ItemKind::Enum(def, ..) = &item.kind {
                 for variant in def.variants {
-                    collector.check_for_lang(Target::Variant, variant.id);
+                    collector.check_for_lang(Target::Variant, variant.hir_id);
                 }
             }
         }