about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
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_borrowck/src
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_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 8a8ecc3b96e..fe6dff7ff1b 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -647,7 +647,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
                     && tc.polarity() == ty::PredicatePolarity::Positive
                     && supertrait_def_ids(tcx, tc.def_id())
                         .flat_map(|trait_did| tcx.associated_items(trait_did).in_definition_order())
-                        .any(|item| item.fn_has_self_parameter)
+                        .any(|item| item.is_method())
             })
         }) {
             return None;