Introduce DefPathData::AnonAssocTy.

PR #137977 changed `DefPathData::TypeNs` to contain `Option<Symbol>` to
account for RPITIT assoc types being anonymous. This commit changes it
back to `Symbol` and gives anonymous assoc types their own variant. It
makes things a bit nicer overall.
This commit is contained in:
Nicholas Nethercote 2025-04-11 14:32:00 +10:00
parent fad2535e4b
commit 9eca59a940
8 changed files with 30 additions and 27 deletions

View file

@ -858,7 +858,8 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> {
| DefPathData::GlobalAsm
| DefPathData::Impl
| DefPathData::MacroNs(_)
| DefPathData::LifetimeNs(_) => {
| DefPathData::LifetimeNs(_)
| DefPathData::AnonAssocTy => {
bug!("symbol_names: unexpected DefPathData: {:?}", disambiguated_data.data)
}
};