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
We should recurse on W<'a, T> and see T: Bound must hold, but we don't even recurse on the self arg of the predicate because the trait has escaping bound vars.
That regression list sucks. I think this is something we should consider slowly moving towards error (or at least deny-by-default) by starting with a warn-by-default lint.
I'm also curious if there's a good MCVE for things that are so "obvious" as the example above. This modification, for example, is pretty clear what the problem is when trying to call wf:
use std::fmt::Debug;traitBound{}structW<'a,T:Bound>(&'aT);fnwf<T>()wherefor<'a>W<'a,T>:Debug{}fnmain(){wf::<u32>();}
But, I could imagine that we can have move subtle things we don't check in e.g. super trait bounds. These could be good candidates to also move towards erroring quicker.
rust-lang/rust#122501 (comment)
This will probably end up complicating implied bounds computation in binders?
The text was updated successfully, but these errors were encountered: