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
Elided lifetime changes in rust_2018_idioms lint is very noisy and results in dramatically degraded APIs for Bevy #131725
With the upcoming release of Rust 2024 edition, we're concerned that rust_2018_idioms will 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_idioms linting, 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.
Reacted by Rose Peck, Bruce, Koute, Christopher Serr, musjj, spore, laund, VitalyR, cyrgani, Ruby Lazuli and 7 more
Here's an example of some in-production code after this lint was applied:
pubfn update_text2d_layout(// Text items which should be reprocessed again, generally when the font hasn't loaded yet.mutqueue:Local<'_,HashSet<Entity>>,muttextures:ResMut<'_,Assets<Image>>,fonts:Res<'_,Assets<Font>>,windows:Query<'_,'_,&Window,With<PrimaryWindow>>,mutscale_factor_changed:EventReader<'_,'_,WindowScaleFactorChanged>,muttexture_atlases:ResMut<'_,Assets<TextureAtlasLayout>>,mutfont_atlas_sets:ResMut<'_,FontAtlasSets>,muttext_pipeline:ResMut<'_,TextPipeline>,muttext_query:Query<'_,'_,(Entity,Ref<'_,TextLayout>,Ref<'_,TextBounds>,&mutTextLayoutInfo,&mutComputedTextBlock,)>,muttext_reader:Text2dReader<'_,'_>,mutfont_system:ResMut<'_,CosmicFontSystem>,mutswash_cache:ResMut<'_,SwashCache>,){
Thanks, that's helpful. It was just an idea. There were a lot of ideas that didn't become actual edition items.
We've passed the go / no go date for all edition items for Rust 2024. The probability of this change happening in a way tied to the release of the Rust 2024 edition is now zero.
Reacted by Alice Cecile, Jubilee, Zachary Harrold, Clar Fon, Christian Hughes, Rose Peck, chell sz, Emerson Coskey, VitalyR, Alexander Sepity and 4 more
Reacted by Alice Cecile, Christian Hughes, poopy, Rose Peck, chell sz, Alexander Sepity, iglak, Hellzbellz123, Joona Aalto and Martin Dickopp
Activity
alice-i-cecile commentedon Oct 15, 2024
Here's an example of some in-production code after this lint was applied:
jieyouxu commentedon Oct 15, 2024
Since this seems to have potential non-minimal ecosystem impact, nominating for T-lang discussion.
@rustbot label +I-lang-nominated
alice-i-cecile commentedon Oct 15, 2024
Turning this on by default is tracked in #54910 and #91639.
16 remaining items
traviscross commentedon Oct 16, 2024
@rustbot labels -A-edition-2024
@alice-i-cecile: If you could, could you please link to what led you to believe this is true?:
For reference, this program is currently accepted in nightly Rust 2024:
Playground link
There are no open edition items for Rust 2024 that would change this behavior.
alice-i-cecile commentedon Oct 16, 2024
This was due to the presence of #54910 in the Lang Edition 2024 project :)
traviscross commentedon Oct 16, 2024
Thanks, that's helpful. It was just an idea. There were a lot of ideas that didn't become actual edition items.
We've passed the go / no go date for all edition items for Rust 2024. The probability of this change happening in a way tied to the release of the Rust 2024 edition is now zero.
musjj commentedon Nov 6, 2024
Will anything change for async functions: #103470?
Right now, elided lifetimes is a hard error for async functions:
It feels really confusing for it to be allowed in regular functions, but not async ones.
shepmaster commentedon Nov 6, 2024
My take is that it's unlikely to change in the near future.
I have discussion of choices in my pull request (look for "Existing hard errors").
CI fixes for Rust 1.89 (#20462)
CI fixes for Rust 1.89 (#20462)
Merge 'main' into 'next-gen-scenes' (#43)
theemathas commentedon Sep 12, 2025
@shepmaster Your PR doesn't mention such a thing. What's the status of this?
shepmaster commentedon Sep 12, 2025
Assuming that "this" means what is discussed in the comment from a year ago and not the entire issue, then running the code from that comment shows that the error is still present, mirroring my previous comment that it was unlikely to change.
If you mean some other topic, feel free to elaborate!