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:
parent
89e93a51c8
commit
78599d83e7
43 changed files with 276 additions and 231 deletions
|
@ -2007,8 +2007,9 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
|
|||
if def.did() != def_id {
|
||||
return None;
|
||||
}
|
||||
let order = !item.name.as_str().starts_with("new");
|
||||
Some((order, item.name, input_len))
|
||||
let name = item.name();
|
||||
let order = !name.as_str().starts_with("new");
|
||||
Some((order, name, input_len))
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
items.sort_by_key(|(order, _, _)| *order);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue