-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function lifetime elision changed in 1.64 #103330
Comments
searched nightlies: from nightly-2022-01-01 to nightly-2022-10-01 bisected with cargo-bisect-rustc v0.6.4Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --access github --timeout 30 --start 2022-01-01 --end 2022-10-01 --regress success |
@rustbot claim |
Actually, this behavior is correct as documented by the reference:
There is exactly one lifetime used in the parameters ( |
That verbiage has existed since 2017 but it compiles on no stable version of rustc prior to 1.64, so I don't think it's actually relevant. (The reference is also explicitly non-normative.) The nomicon mirrors the RFC in specifying input positions, not counts. Regardless of documentation, as something that has not compiled on Rust 1.0--1.63 but compiles today, this is clearly a change in language behavior without FCP which I believe to be unintentional. @rustbot label +T-lang |
Ok, so we will consider this for now a @rustbot label -I-prioritize +P-critical |
Filed #103450 |
Nominating for lang team to figure out what we should do with this. Will also ping on zulip. |
Discussed in lang, dropping nomination. Agreement that we want to revert the change in behavior and backport that to 1.65 (and 1.64, but that's not happening given short time window). |
…er-errors Do not consider repeated lifetime params for elision. Fixes rust-lang#103330
Do not consider repeated lifetime params for elision. Fixes rust-lang/rust#103330
Do not consider repeated lifetime params for elision. Fixes rust-lang/rust#103330
Do not consider repeated lifetime params for elision. Fixes rust-lang/rust#103330
I tried this code:
I expected to see this happen:
Instead, this happened: Successful compilation
Meta
Tested on the playground, all versions and editions.
Notes
I'm labeling this as a regression as I believe it is severe enough of an unplanned change (at best an accidental stabilization?) that I should draw attention to it, even though I haven't found a way to cause miscompilation for example. I also have not tried to do so at all yet.
@rustbot label +T-compiler +A-lifetimes +regression-from-stable-to-stable
The text was updated successfully, but these errors were encountered: