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
Yeah the current situation is pretty goofy. It'd probably be best if we could report an error when providing lifetimes unless you provide all of them (late and early bound) -- at minimum, for now, we could just make it an error to specify lifetimes if any of them are late bound.
Nominating so this doesn't get lost. I'm a bit nervous because of backwards compatibility. (In fact, I already recommended to @jdm a hack that relied on the current behavior.)
This situation has been a problem for a long time in various forms, and is a bit obscure, but nonetheless current situation is not great. To some extent this is also a @rust-lang/lang question.
Activity
eddyb commentedon Jun 7, 2017
They become late-bound when not used in bounds or are used only the return type.
cc @nikomatsakis We should really do something about this.
nikomatsakis commentedon Jun 7, 2017
Yeah the current situation is pretty goofy. It'd probably be best if we could report an error when providing lifetimes unless you provide all of them (late and early bound) -- at minimum, for now, we could just make it an error to specify lifetimes if any of them are late bound.
Nominating so this doesn't get lost. I'm a bit nervous because of backwards compatibility. (In fact, I already recommended to @jdm a hack that relied on the current behavior.)
nikomatsakis commentedon Jun 7, 2017
Purpose of nomination is to try and decide how we should handle this and how to prioritize.
nikomatsakis commentedon Jun 8, 2017
triage: P-medium
This situation has been a problem for a long time in various forms, and is a bit obscure, but nonetheless current situation is not great. To some extent this is also a @rust-lang/lang question.
nikomatsakis commentedon Jun 8, 2017
I'm going to change to T-lang. There are definitely some thorny questions here.
nikomatsakis commentedon Jun 15, 2017
Discussed in the @rust-lang/lang meeting -- we agree that restricting to 100% early-bound is the right thing here. As proposed in #42492
nikomatsakis commentedon Jun 15, 2017
triage: P-high
nikomatsakis commentedon Jun 15, 2017
@petrochenkov since you agreed to take a stab at that lint, I'm assigning you to the issue for now :) hope that's ok