about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/impl_wf_check.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-04-14 13:15:01 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-04-15 08:07:15 +1000
commit78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18 (patch)
treec1c0488e6609360dba87b88a8e390b3ebfce939a /compiler/rustc_hir_analysis/src/impl_wf_check.rs
parent89e93a51c81b521a9601b365e3325d31e44e9198 (diff)
downloadrust-78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18.tar.gz
rust-78599d83e7ab9f8cd4cbb9e982ddf12f258d6b18.zip
Move `name` field from `AssocItem` to `AssocKind` variants.
To accurately reflect that RPITIT assoc items don't have a name. This
avoids the use of `kw::Empty` to mean "no name", which is error prone.

Helps with #137978.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/impl_wf_check.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/impl_wf_check.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check.rs b/compiler/rustc_hir_analysis/src/impl_wf_check.rs
index 127ca846b9f..cbdc501291b 100644
--- a/compiler/rustc_hir_analysis/src/impl_wf_check.rs
+++ b/compiler/rustc_hir_analysis/src/impl_wf_check.rs
@@ -119,7 +119,7 @@ pub(crate) fn enforce_impl_lifetime_params_are_constrained(
                         vec![]
                     }
                 }
-                ty::AssocKind::Fn { .. } | ty::AssocKind::Const => vec![],
+                ty::AssocKind::Fn { .. } | ty::AssocKind::Const { .. } => vec![],
             }
         })
         .collect();