about summary refs log tree commit diff
path: root/compiler/rustc_hir/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-19 21:23:39 +0000
committerbors <bors@rust-lang.org>2023-09-19 21:23:39 +0000
commitbdb0fa3ee5ffb4cc1a1b53cbe8344a2b83b1ae2a (patch)
treece02ec8d67d4529a511da42385a14ea2bd36e409 /compiler/rustc_hir/src
parentac5ac4754a4a837f7138a1fa5ab01475b63fc9fe (diff)
parent832a2a18e722f13141898a7c3918c5cb45a8c043 (diff)
downloadrust-bdb0fa3ee5ffb4cc1a1b53cbe8344a2b83b1ae2a.tar.gz
rust-bdb0fa3ee5ffb4cc1a1b53cbe8344a2b83b1ae2a.zip
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.
Diffstat (limited to 'compiler/rustc_hir/src')
-rw-r--r--compiler/rustc_hir/src/definitions.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/definitions.rs b/compiler/rustc_hir/src/definitions.rs
index 66b153d8931..168b336e374 100644
--- a/compiler/rustc_hir/src/definitions.rs
+++ b/compiler/rustc_hir/src/definitions.rs
@@ -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,