1
Fork 0

Rollup merge of #123998 - compiler-errors:opaque-ns, r=davidtwco

Opaque types have no namespace

Opaques are never referenced by name -- even when we have `type X = impl Sized;`, `X` is the name of the type alias, not the opaque.
This commit is contained in:
Guillaume Gomez 2024-04-16 15:19:15 +02:00 committed by GitHub
commit f5adfa0e69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -207,7 +207,6 @@ impl DefKind {
| DefKind::Enum | DefKind::Enum
| DefKind::Variant | DefKind::Variant
| DefKind::Trait | DefKind::Trait
| DefKind::OpaqueTy
| DefKind::TyAlias | DefKind::TyAlias
| DefKind::ForeignTy | DefKind::ForeignTy
| DefKind::TraitAlias | DefKind::TraitAlias
@ -234,7 +233,8 @@ impl DefKind {
| DefKind::Use | DefKind::Use
| DefKind::ForeignMod | DefKind::ForeignMod
| DefKind::GlobalAsm | DefKind::GlobalAsm
| DefKind::Impl { .. } => None, | DefKind::Impl { .. }
| DefKind::OpaqueTy => None,
} }
} }