Closed lcnr closed 1 year ago
trait Trait {} trait OtherTrait { type Assoc<'a>; } impl<T: OtherTrait> Trait for (T, for<'a> fn(<T as OtherTrait>::Assoc<'a>)) {} impl OtherTrait for u32 { type Assoc<'a> = &'a u32; } fn impls<T: Trait>() {} fn main() { impls::<(u32, for<'a> fn(&'a u32))>(); }
This does not work with the old solver but will compile with the new solver.
This means that https://github.com/rust-lang/rust/issues/105787 will end up being exploitable with the new solver though, so we may want to fix that first :shrug:
opened https://github.com/rust-lang/trait-system-refactor-initiative/issues/9
This does not work with the old solver but will compile with the new solver.
This means that https://github.com/rust-lang/rust/issues/105787 will end up being exploitable with the new solver though, so we may want to fix that first :shrug: