-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Swap most uses of allow in lints to expect #15059
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
Comments
I'd also like to turn on the new |
I'll take a stab at this! |
If someone wants to work on this, I got a lot of progress done in #15118. Feel free to adopt it and follow my advice here for finishing it. |
My suggestion for those tackling this is to handle this one crate at a time: that will ensure it's easier to complete and review smaller bits of work. |
# Objective > Rust 1.81 released the #[expect(...)] attribute, which works like #[allow(...)] but throws a warning if the lint isn't raised. This is preferred to #[allow(...)] because it tells us when it can be removed. - Adopts the parts of #15118 that are complete, and updates the branch so it can be merged. - There were a few conflicts, let me know if I misjudged any of 'em. Alice's [recommendation](#15059 (comment)) seems well-taken, let's do this crate by crate now that @BD103 has done the lion's share of this! (Relates to, but doesn't yet completely finish #15059.) Crates this _doesn't_ cover: - bevy_input - bevy_gilrs - bevy_window - bevy_winit - bevy_state - bevy_render - bevy_picking - bevy_core_pipeline - bevy_sprite - bevy_text - bevy_pbr - bevy_ui - bevy_gltf - bevy_gizmos - bevy_dev_tools - bevy_internal - bevy_dylib --------- Co-authored-by: BD103 <[email protected]> Co-authored-by: Ben Frankel <[email protected]> Co-authored-by: Antony <[email protected]>
Copying BD103's instructions/workflow for ease of reference. Also note that crate-level
(Note that the current bug doesn't surface until |
Keeping a list here for my own reference: these were not covered by the previous PR.
|
Just tracking things for myself... it looks like stable Rust 1.83 is 62 days away, so I have a reminder to revisit this end of November when we can rely on |
Looking into this again... |
# Objective We were waiting for 1.83 to address most of these, due to a bug with `missing_docs` and `expect`. Relates to, but does not entirely complete, #15059. ## Solution - Upgrade to 1.83 - Switch `allow(missing_docs)` to `expect(missing_docs)` - Remove a few now-unused `allow`s along the way, or convert to `expect`
# Objective We were waiting for 1.83 to address most of these, due to a bug with `missing_docs` and `expect`. Relates to, but does not entirely complete, bevyengine#15059. ## Solution - Upgrade to 1.83 - Switch `allow(missing_docs)` to `expect(missing_docs)` - Remove a few now-unused `allow`s along the way, or convert to `expect`
# Objective We were waiting for 1.83 to address most of these, due to a bug with `missing_docs` and `expect`. Relates to, but does not entirely complete, bevyengine#15059. ## Solution - Upgrade to 1.83 - Switch `allow(missing_docs)` to `expect(missing_docs)` - Remove a few now-unused `allow`s along the way, or convert to `expect`
@bas-ie, are we fully done with this at this point? |
I don't think so. I haven't looked specifically lately, but I think we just got the instances that were in BD's original PR and a few extras. I'll go hunting for more 👀 |
What problem does this solve or what need does it fill?
With the advent of Rust 1.81, we can now distinguish between lints that we haven't gotten around to fixing and those where the lint is wrong.
What solution would you like?
Most localized lints in Bevy should be
expect
: the only exception that comes to mind ismissing_docs
.Leave the
Cargo.toml
lints set as allow, as funny as it would be to set a crate-levelexpect(type_complexity)
.The text was updated successfully, but these errors were encountered: