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
{{ message }}
Repository navigation
E0794 has a seemingly incorrect definition of "late bound lifetime parameter" #139652
Here are some conditions for being late bound. However, note that the "constrained" section is (AFAICT) talking about lifetimes that appear in the output type, so doesn't apply to the OP.
// I.e. this lifetime is still late boundfnunused_param<'a>(){}
traitTrait{typeGat<'a>;// Lifetimes in projections do not constrainfnboth_are_early_bound<'s:'s,'a>(&'sself, _:Self::Gat<'a>) -> Self::Gat<'a>;// Unconstrained but not in output type so still late bound// (similar to `unused_param`) vvfnboth_are_late_bound(&self, _:Self::Gat<'_>);}
And "appear in the output type" includes elided lifetimes, including those implicitly captured by opaque types.
Activity
Jules-Bertholet commentedon Apr 11, 2025
IIUC it should be “appears in an argument type, or does not appear in the return type”.
QuineDot commentedon Apr 26, 2025
I agree the E0794 definition is incomplete.
Here are some conditions for being late bound. However, note that the "constrained" section is (AFAICT) talking about lifetimes that appear in the output type, so doesn't apply to the OP.
Also note that "constrained" is not as simple as "appears in".
And "appear in the output type" includes elided lifetimes, including those implicitly captured by opaque types.
Which leads to confusing errors when eschewing aliases or using refinement: see #87803, #109476, #135350.