-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Elided lifetime changes in rust_2018_idioms lint is very noisy and results in dramatically degraded APIs for Bevy #131725
Copy link
Copy link
Open
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.L-elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsT-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.L-elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsT-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
With the upcoming release of Rust 2024 edition, we're concerned that
rust_2018_idiomswill be deny by default.[Editorial comment (TC): This is not an edition item for Rust 2024, and the edition is not accepting any new items, so we can say definitely that this will not be tied to the release of Rust 2024. See here.]
We investigated what these changes will entail for Bevy in bevyengine/bevy#15916, and the impact is quite severe. Our primary user-facing system and query APIs are littered with meaningless lifetimes.
This is a much worse experience with no upside for us, and Bevy and its entire ecosystem will have to manually allow this lint on every project.
Proposed solution
We would appreciate if the elided lifetimes lint could be split out from the rest of the
rust_2018_idiomslinting, which we generally liked the effect of.Ideally this would be off by default as well, to avoid needing to teach new users to turn it off as a critical part of project setup.