-
-
Notifications
You must be signed in to change notification settings - Fork 218
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 clippy: operator precedence can trip the unwary. #1055
Conversation
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1055 |
I tend to agree with the sentiments from rust-lang/rust-clippy#14097 and rust-lang/rust-clippy#14115:
godot-rust being a FFI-centric project many low-level components, and bit manipulations are very common across the Godot engine. Being aware of bit operator precedence is something we can expect from contributors (even if mistakes can of course happen, me included). I find the extra readability from not having to parenthesise worth it. I consider this lint being warn-by-default a regression, and clippy maintainers have agreed by splitting the lint up into separate ones. As such we should do it like microsoft/openvmm@f403f51 and temporarily disable this lint, with a TODO that we re-enable it for Rust 1.86. The useless busywork is a bit annoying, but it's also on us for using the latest version in CI. We should not do it on a |
Side note, I usually label clippy issues as |
2133316
to
3c54e66
Compare
Includes bitmasking and shift operations in Rust 1.85. This behaviour will be reverted once Rust 1.86 is stable.
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.
Thanks a lot! 👍
Added TODOs in CI workflows as well, and linked to this PR.
No description provided.