Closed
Description
trait Trait<'a> {
type Assoc;
}
fn foo<T: for<'a> Trait<'a>>() -> for<'a> fn(<T as Trait<'a>>::Assoc) {
todo!()
}
fn bar<T: for<'a> Trait<'a>>() {
let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::<T>();
}
This changed from an ICE on stable to compiling on beta and nightly: https://godbolt.org/z/E45bfa1d1
this shouldn't happen unintentionally and afaik we haven't added a test for this behavior either.
It would be very good to figure out which PR is responsible for this change.