about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/abi_test.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-13 22:39:10 +0000
committerbors <bors@rust-lang.org>2025-07-13 22:39:10 +0000
commit9c3064e131f4939cc95a29bb11413c49bbda1491 (patch)
tree8320ff7f32aa67eec55081c56987eb517095cb49 /compiler/rustc_passes/src/abi_test.rs
parente9182f195b8505c87c4bd055b9f6e114ccda0981 (diff)
parent27127e342d28ebeb0734916ada6979b6938fb532 (diff)
downloadrust-9c3064e131f4939cc95a29bb11413c49bbda1491.tar.gz
rust-9c3064e131f4939cc95a29bb11413c49bbda1491.zip
Auto merge of #143357 - cjgillot:no-assoc-item-kind, r=compiler-errors
Retire hir::*ItemRef.

This information was kept for various places that iterate on HIR to know about trait-items and impl-items.

This PR replaces them by uses of the `associated_items` query that contain pretty much the same information.

This shortens many spans to just `def_span`, which can be easier to read.
Diffstat (limited to 'compiler/rustc_passes/src/abi_test.rs')
-rw-r--r--compiler/rustc_passes/src/abi_test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/abi_test.rs b/compiler/rustc_passes/src/abi_test.rs
index b139ed6a66c..0ac42f03eb2 100644
--- a/compiler/rustc_passes/src/abi_test.rs
+++ b/compiler/rustc_passes/src/abi_test.rs
@@ -79,7 +79,7 @@ fn dump_abi_of_fn_item(tcx: TyCtxt<'_>, item_def_id: LocalDefId, attr: &Attribut
     for meta_item in meta_items {
         match meta_item.name() {
             Some(sym::debug) => {
-                let fn_name = tcx.item_name(item_def_id.into());
+                let fn_name = tcx.item_name(item_def_id);
                 tcx.dcx().emit_err(AbiOf {
                     span: tcx.def_span(item_def_id),
                     fn_name,
@@ -135,7 +135,7 @@ fn dump_abi_of_fn_type(tcx: TyCtxt<'_>, item_def_id: LocalDefId, attr: &Attribut
                     item_def_id,
                 );
 
-                let fn_name = tcx.item_name(item_def_id.into());
+                let fn_name = tcx.item_name(item_def_id);
                 tcx.dcx().emit_err(AbiOf { span, fn_name, fn_abi: format!("{:#?}", abi) });
             }
             Some(sym::assert_eq) => {