Checks that an opaque type does not contain cycles and does not use Self or T::Foo
projections that would result in “inheriting lifetimes”.
Checks that an opaque type does not contain cycles.
Checks that an opaque type does not use Self or T::Foo projections that would result
in “inheriting lifetimes”.
Check that the concrete type behind impl Trait actually implements Trait.
Check that a static is inhabited.
Check that the fields of the union do not need dropping.
Part of enum check. Given the discriminants of an enum, errors if two or more discriminants are equal
In case it is in a nested opaque type, find that opaque type’s
usage in the function signature and use the generic arguments from the usage site.
We need to do because RPITs ignore the lifetimes of the function,
as they have their own copies of all the lifetimes they capture.
So the only way to get the lifetimes represented in terms of the function,
is to look how they are used in the function signature (or do some other fancy
recording of this mapping at ast -> hir lowering time).
Emit an error for recursive opaque types.