about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-28 16:38:15 +0000
committerbors <bors@rust-lang.org>2025-07-28 16:38:15 +0000
commite3514bde96d2d13586337a48db77fa64b850d249 (patch)
tree4b7ae3db59d7fc366645a22c922598df2970357d /compiler/rustc_codegen_llvm/src
parent9ba00e0f9e00990fb88c1beac7172afe93b15609 (diff)
parentcdcfdd1a1b3f267a98c693fc03b4411934b60674 (diff)
downloadrust-e3514bde96d2d13586337a48db77fa64b850d249.tar.gz
rust-e3514bde96d2d13586337a48db77fa64b850d249.zip
Auto merge of #144377 - camsteffen:simplify-impl-of-method, r=fee1-dead
Rename impl_of_method and trait_of_item

This PR used to tweak the implementation of impl_of_method, but that introduced a perf regression.

Rename impl_of_method and trait_of_item to impl_of_assoc and trait_of_assoc respectively. This reflects how the two functions are closely related. And it reflects the behavior more accurately as the functions check whether the input is an associated item.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
index 5ca2505cec4..6cbf2dbf7d3 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
@@ -533,7 +533,7 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
             // First, let's see if this is a method within an inherent impl. Because
             // if yes, we want to make the result subroutine DIE a child of the
             // subroutine's self-type.
-            if let Some(impl_def_id) = cx.tcx.impl_of_method(instance.def_id()) {
+            if let Some(impl_def_id) = cx.tcx.impl_of_assoc(instance.def_id()) {
                 // If the method does *not* belong to a trait, proceed
                 if cx.tcx.trait_id_of_impl(impl_def_id).is_none() {
                     let impl_self_ty = cx.tcx.instantiate_and_normalize_erasing_regions(