1
Fork 0

Add AliasKind::Weak for type aliases.

Only use it when the type alias contains an opaque type.

Also does wf-checking on such type aliases.
This commit is contained in:
Oli Scherer 2023-03-07 12:03:11 +00:00
parent 4fdd07fe88
commit f3b7dd6388
86 changed files with 474 additions and 199 deletions

View file

@ -208,6 +208,9 @@ fn do_orphan_check_impl<'tcx>(
// }
// impl<T: ?Sized> AutoTrait for <T as Id>::This {}
AliasKind::Projection => "associated type",
// type Foo = (impl Sized, bool)
// impl AutoTrait for Foo {}
AliasKind::Weak => "type alias",
// type Opaque = impl Trait;
// impl AutoTrait for Opaque {}
AliasKind::Opaque => "opaque type",