Closed
Description
This code compiles, but it should not:
#![feature(min_type_alias_impl_trait)]
type X<'a, 'b> = impl std::fmt::Debug;
fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
(a, a)
}
The function creates two constraints:
X<'t, 'u> = &'t u32
, which meanstype X<'a, 'b> = &'a u32
X<'u, 't> = &'t u32
, which meanstype X<'a, 'b> = &'b u32
These should not both be satisfiable!