Skip to content

Commit

Permalink
Rollup merge of #123998 - compiler-errors:opaque-ns, r=davidtwco
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GuillaumeGomez authored Apr 16, 2024
2 parents 6629fe6 + 8d07d90 commit f5adfa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_hir/src/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ impl DefKind {
| DefKind::Enum
| DefKind::Variant
| DefKind::Trait
| DefKind::OpaqueTy
| DefKind::TyAlias
| DefKind::ForeignTy
| DefKind::TraitAlias
Expand All @@ -234,7 +233,8 @@ impl DefKind {
| DefKind::Use
| DefKind::ForeignMod
| DefKind::GlobalAsm
| DefKind::Impl { .. } => None,
| DefKind::Impl { .. }
| DefKind::OpaqueTy => None,
}
}

Expand Down

0 comments on commit f5adfa0

Please sign in to comment.