1
Fork 0

Auto merge of #113955 - cjgillot:name-apit, r=WaffleLapkin

Pretty-print argument-position impl trait to name it.

This removes a corner case.

RPIT and TAIT keep having no name, and it would be wrong to use the one in HIR (Ident::empty), so I make this case ICE.
This commit is contained in:
bors 2023-09-19 21:23:39 +00:00
commit bdb0fa3ee5
4 changed files with 9 additions and 12 deletions

View file

@ -278,7 +278,8 @@ pub enum DefPathData {
Ctor,
/// A constant expression (see `{ast,hir}::AnonConst`).
AnonConst,
/// An `impl Trait` type node.
/// An existential `impl Trait` type node.
/// Argument position `impl Trait` have a `TypeNs` with their pretty-printed name.
ImplTrait,
/// `impl Trait` generated associated type node.
ImplTraitAssocTy,