You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traitId{typeThis<'a>;}#[derive(Copy,Clone)]structW<T>(T);implIdforW<u32>{typeThis<'a> = W<u32>;}implIdforW<i32>{typeThis<'a> = W<i32>;}traitTrait<T>{}// when using this impl we only normalize after instantiating// with infer vars, at this point `<?t as Id>::This<'a>` is still// ambig, so we keep the alias around and require it to structurally// relate.impl<T:Id>Trait<for<'a> fn(T::This<'a>)>forT{}fnis_trait<T:Trait<U>,U>(_x:T){}fnmain(){let x = W(1);// We prove `W<_>: Trait<for<'a> fn(<W<_>>::This<'a>)>` during// typeck, and `W<i32>: Trait<for<'a> fn(<W<i32>)>` during borrowck.// This then fails.is_trait(x);let _:W<i32> = x;}
lcnr
added
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Apr 23, 2025
lcnr
changed the title
imcompletely relating alias args may cause borrowck ICE
incompletely relating alias args may cause borrowck ICE
Apr 23, 2025
ICEs with
The text was updated successfully, but these errors were encountered: