about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-04-15 15:47:27 +1000
committerGitHub <noreply@github.com>2025-04-15 15:47:27 +1000
commit13cd5256acf1fdae1721047a4beb8aeeae360480 (patch)
tree76b85f795a81ab08f508ca783891853b24fb94ca /compiler/rustc_ast_lowering
parentefcf4f9d2db589b03d7fa320de19915f3e4f86cd (diff)
parent78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18 (diff)
downloadrust-13cd5256acf1fdae1721047a4beb8aeeae360480.tar.gz
rust-13cd5256acf1fdae1721047a4beb8aeeae360480.zip
Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk
Overhaul `AssocItem`

`AssocItem` has multiple fields that only make sense some of the time. E.g. the `name` can be empty if it's an RPITIT associated type. It's clearer and less error prone if these fields are moved to the relevant `kind` variants.

r? ``@fee1-dead``
Diffstat (limited to 'compiler/rustc_ast_lowering')
-rw-r--r--compiler/rustc_ast_lowering/src/delegation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/delegation.rs b/compiler/rustc_ast_lowering/src/delegation.rs
index 2296b05f69b..93c627f64c9 100644
--- a/compiler/rustc_ast_lowering/src/delegation.rs
+++ b/compiler/rustc_ast_lowering/src/delegation.rs
@@ -85,7 +85,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
                     .delegation_fn_sigs
                     .get(&local_def_id)
                     .is_some_and(|sig| sig.has_self),
-                None => self.tcx.associated_item(def_id).fn_has_self_parameter,
+                None => self.tcx.associated_item(def_id).is_method(),
             },
             _ => span_bug!(span, "unexpected DefKind for delegation item"),
         }