diff options
Diffstat (limited to '')
-rw-r--r-- | compiler/rustc_hir/src/definitions.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_hir/src/definitions.rs b/compiler/rustc_hir/src/definitions.rs index 21cf214e4..8ceb17649 100644 --- a/compiler/rustc_hir/src/definitions.rs +++ b/compiler/rustc_hir/src/definitions.rs @@ -92,7 +92,7 @@ impl DefPathTable { /// The definition table containing node definitions. /// It holds the `DefPathTable` for `LocalDefId`s/`DefPath`s. /// It also stores mappings to convert `LocalDefId`s to/from `HirId`s. -#[derive(Clone, Debug)] +#[derive(Debug)] pub struct Definitions { table: DefPathTable, next_disambiguator: FxHashMap<(LocalDefId, DefPathData), u32>, @@ -280,6 +280,8 @@ pub enum DefPathData { AnonConst, /// An `impl Trait` type node. ImplTrait, + /// `impl Trait` generated associated type node. + ImplTraitAssocTy, } impl Definitions { @@ -403,7 +405,7 @@ impl DefPathData { TypeNs(name) | ValueNs(name) | MacroNs(name) | LifetimeNs(name) => Some(name), Impl | ForeignMod | CrateRoot | Use | GlobalAsm | ClosureExpr | Ctor | AnonConst - | ImplTrait => None, + | ImplTrait | ImplTraitAssocTy => None, } } @@ -422,7 +424,7 @@ impl DefPathData { ClosureExpr => DefPathDataName::Anon { namespace: sym::closure }, Ctor => DefPathDataName::Anon { namespace: sym::constructor }, AnonConst => DefPathDataName::Anon { namespace: sym::constant }, - ImplTrait => DefPathDataName::Anon { namespace: sym::opaque }, + ImplTrait | ImplTraitAssocTy => DefPathDataName::Anon { namespace: sym::opaque }, } } } |