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.
Activity
compiler-errors commentedon Apr 8, 2024
Minimal I think:
We should recurse on
W<'a, T>
and seeT: Bound
must hold, but we don't even recurse on the self arg of the predicate because the trait has escaping bound vars.jackh726 commentedon Apr 11, 2024
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
: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.