Open
Description
#![feature(type_alias_impl_trait)]
type Tait<'a> = impl Sized;
fn define<'a>(x: &'a ()) -> Tait<'a> {
()
}
fn x<'a>(x: &'a (), t: Tait<'a>) -> Tait<'a> {
t
}
This example fails with overflow in the new solver right now
error[E0275]: overflow evaluating the requirement `Tait<'a> <: Tait<'a>`
--> src/main.rs:9:46
|
9 | fn x<'a>(x: &'a (), t: Tait<'a>) -> Tait<'a> {
| ______________________________________________^
10 | | t
11 | | }
| |_^
Changing alias relate or the way we define opaque types can cause this to result in ambiguity instead. Fundamentally we want exists<'0, '1> alias-relate(Tait<'0>, Tait<'1>)
to hold inside of the defining scope of Tait
, regardless of whether we actually define Tait
.
Metadata
Metadata
Assignees
Labels
No labels