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.
This commit is contained in:
@@ -32,7 +32,7 @@ pub(super) fn find_opaque_ty_constraints_for_impl_trait_in_assoc_type(
|
||||
for &assoc_id in tcx.associated_item_def_ids(impl_def_id) {
|
||||
let assoc = tcx.associated_item(assoc_id);
|
||||
match assoc.kind {
|
||||
ty::AssocKind::Const | ty::AssocKind::Fn { .. } => {
|
||||
ty::AssocKind::Const { .. } | ty::AssocKind::Fn { .. } => {
|
||||
locator.check(assoc_id.expect_local())
|
||||
}
|
||||
// Associated types don't have bodies, so they can't constrain hidden types
|
||||
|
||||
Reference in New Issue
Block a user