-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix CI for Rust 1.72 #9562
Fix CI for Rust 1.72 #9562
Conversation
crates/bevy_macros_compile_fail_tests/tests/deref_mut_derive/missing_deref.fail.stderr
Outdated
Show resolved
Hide resolved
crates/bevy_macros_compile_fail_tests/tests/deref_mut_derive/missing_deref.fail.stderr
Outdated
Show resolved
Hide resolved
…issing_deref.fail.stderr Co-authored-by: François <[email protected]>
…issing_deref.fail.stderr Co-authored-by: François <[email protected]>
Might be fixable: https://github.com/rust-lang/rustfmt/blob/v1.6.0/Configurations.md#single_line_let_else_max_width |
I think that there must be some bug with edit: some discussion here: rust-lang/rustfmt#5849 |
@cart The style guide1 reads like it should just work as long as we remove the semicolon from after the return
The reference2 grammar implies that any expression (including return expressions 3) which is followed by a semicolon becomes an Though it also says
.. which makes it seem like sometimes expressions without a semicolon may be parsed as statements anyway, if they are a block or "control flow expression" (idk where that group is really defined). |
It seems like that helps in the case of |
That seems like it would be caused by this "unstable" rustfmt option.. https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=semi#trailing_semicolon |
We seemingly can't set Doing so results in a spam of many lines of
in the console while formatting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be merged ASAP
[Rust 1.72.0](https://blog.rust-lang.org/2023/08/24/Rust-1.72.0.html) is now stable. - `let-else` formatting has arrived! - I chose to allow `explicit_iter_loop` due to rust-lang/rust-clippy#11074. We didn't hit any of the false positives that prevent compilation, but fixing this did produce a lot of the "symbol soup" mentioned, e.g. `for image in &mut *image_events {`. Happy to undo this if there's consensus the other way. --------- Co-authored-by: François <[email protected]>
This reverts commit 069db4b.
Objective
Rust 1.72.0 is now stable.
Notes
let-else
formatting has arrived!I chose to allow
explicit_iter_loop
due to explicit_iter_loop:x.iter_mut()
vs&mut *x
rust-lang/rust-clippy#11074.We didn't hit any of the false positives that prevent compilation, but fixing this did produce a lot of the "symbol soup" mentioned, e.g.
for image in &mut *image_events {
.Happy to undo this if there's consensus the other way.