@@ -309,6 +309,8 @@ pub enum DefPathData {
309
309
/// An existential `impl Trait` type node.
310
310
/// Argument position `impl Trait` have a `TypeNs` with their pretty-printed name.
311
311
OpaqueTy ,
312
+ /// Used for remapped captured lifetimes in an existential `impl Trait` type node.
313
+ OpaqueLifetime ( Symbol ) ,
312
314
/// An anonymous associated type from an RPITIT. The symbol refers to the name of the method
313
315
/// that defined the type.
314
316
AnonAssocTy ( Symbol ) ,
@@ -445,7 +447,8 @@ impl DefPathData {
445
447
pub fn get_opt_name ( & self ) -> Option < Symbol > {
446
448
use self :: DefPathData :: * ;
447
449
match * self {
448
- TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name) => Some ( name) ,
450
+ TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name)
451
+ | OpaqueLifetime ( name) => Some ( name) ,
449
452
450
453
Impl
451
454
| ForeignMod
@@ -465,9 +468,8 @@ impl DefPathData {
465
468
fn hashed_symbol ( & self ) -> Option < Symbol > {
466
469
use self :: DefPathData :: * ;
467
470
match * self {
468
- TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name) | AnonAssocTy ( name) => {
469
- Some ( name)
470
- }
471
+ TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name) | AnonAssocTy ( name)
472
+ | OpaqueLifetime ( name) => Some ( name) ,
471
473
472
474
Impl
473
475
| ForeignMod
@@ -486,9 +488,8 @@ impl DefPathData {
486
488
pub fn name ( & self ) -> DefPathDataName {
487
489
use self :: DefPathData :: * ;
488
490
match * self {
489
- TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name) => {
490
- DefPathDataName :: Named ( name)
491
- }
491
+ TypeNs ( name) | ValueNs ( name) | MacroNs ( name) | LifetimeNs ( name)
492
+ | OpaqueLifetime ( name) => DefPathDataName :: Named ( name) ,
492
493
// Note that this does not show up in user print-outs.
493
494
CrateRoot => DefPathDataName :: Anon { namespace : kw:: Crate } ,
494
495
Impl => DefPathDataName :: Anon { namespace : kw:: Impl } ,
0 commit comments