-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Lint that warns when an elided lifetime ends up being a named lifetime (elided_named_lifetimes
)
#129207
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
54ea765
to
1aaa280
Compare
This comment has been minimized.
This comment has been minimized.
1aaa280
to
adb7901
Compare
This comment has been minimized.
This comment has been minimized.
d2e0d11
to
c8b7220
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cc @davidtwco, @compiler-errors, @TaKO8Ki Some changes occurred in src/tools/clippy cc @rust-lang/clippy The Miri subtree was changed cc @rust-lang/miri |
|
Could you submit d214d0b as a standalone PR? Is can be merged while we review this PR. |
Thanks! As for the matter with 2 alternative ideas:
|
…times, r=cjgillot Fix `elided_named_lifetimes` in code rust-lang#129207 (comment) r? cjgillot
…times, r=cjgillot Fix `elided_named_lifetimes` in code rust-lang#129207 (comment) r? cjgillot
Ah, I was worried that it might cause some sort of a problem, and indeed it does. Oh well. I seem to have fixed it and I also added a test for this. |
@rustbot author |
Due to a change in Rust nightly, the Rust linter now warns when an elided lifetime ends up being a named lifetime [1]. In this case, the elided lifetime is `'static`, so we should explicitly set the named lifetime to `'static`. [1] rust-lang/rust#129207
Part of the Deno project is built with Rust +nightly and is being hit by this change-set with the following error:
The fix is easy [1], but I thought I would leave this here in case others are being hit by it and hopefully google can index "elided lifetime has a name". |
Due to a change in Rust nightly, the Rust linter now warns when an elided lifetime ends up being a named lifetime [1]. In this case, the elided lifetime is `'static`, so we should explicitly set the lifetime to `'static`. [1] rust-lang/rust#129207
There is an upcoming PR implementing suggestions for this lint #129840. Currently it is in a conflict with some of clippy's suggestions, but maybe I can mark it non-machine-applicable for now, so that there are at least human-readable suggestions preventing confusion. Thank you for your report! |
…s-suggestion, r=cjgillot Implement suggestions for `elided_named_lifetimes` A follow-up to rust-lang#129207, as per rust-lang#129207 (comment). r? cjgillot I will probably squash this a bit, but later. `@rustbot` label +A-lint
Rollup merge of rust-lang#129840 - GrigorenkoPV:elided-named-lifetimes-suggestion, r=cjgillot Implement suggestions for `elided_named_lifetimes` A follow-up to rust-lang#129207, as per rust-lang#129207 (comment). r? cjgillot I will probably squash this a bit, but later. `@rustbot` label +A-lint
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462 UltraBlame original commit: 22a83ceba50b60d9407cbd3afc0a620b6c5d9eed
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462 UltraBlame original commit: 22a83ceba50b60d9407cbd3afc0a620b6c5d9eed
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462 UltraBlame original commit: 22a83ceba50b60d9407cbd3afc0a620b6c5d9eed
I compile Zed from nightly build pretty often and I've noticed that we're getting a few hits on new rustc lint: rust-lang/rust#129207
I compile Zed from nightly build pretty often and I've noticed that we're getting a few hits on new rustc lint: rust-lang/rust#129207 Release Notes: - N/A
Due to a change in Rust nightly, the Rust linter now warns when an elided lifetime ends up being a named lifetime [1]. In this case, the elided lifetime is `'static`, so we should explicitly set the lifetime to `'static`. [1] rust-lang/rust#129207
I compile Zed from nightly build pretty often and I've noticed that we're getting a few hits on new rustc lint: rust-lang/rust#129207 Release Notes: - N/A
rust-lang/rust#129207 helps name certain elided lifetimes
rust-lang/rust#129207 helps name certain elided lifetimes
rust-lang/rust#129207 helps name certain elided lifetimes
rust-lang/rust#129207 helps name certain elided lifetimes
…milio This warning was introduced by rust-lang/rust#129207. Differential Revision: https://phabricator.services.mozilla.com/D221462
As suggested in #48686 (comment)
Fixes #48686