Uh oh!
There was an error while loading. Please reload this page.
unused_parens now fires on cast expression - #110189
Conversation
rustbot
commented
Apr 11, 2023
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
rustbot
commented
Apr 11, 2023
|
rustbot
commented
Apr 11, 2023
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b-naber
left a comment
There was a problem hiding this comment.
Some nits, but LGTM.
Also you shouldn't have any changes in submodules here.
This comment has been minimized.
This comment has been minimized.
920f651 to
8488fd0Compare(force-pushed to drop accidental changes in stdarch submodule) should it be fixed in this PR as well as other occurrences? |
KittyBorgX
commented
Apr 12, 2023
@KisaragiEffective I'd suggest doing so if it isn't against the reviewer's descretion since that'll be the only way the CI passes and the compiler builds fully :) |
KisaragiEffective
commented
Apr 12, 2023
submitted rust-lang/stdarch#1411, marking this as a draft until it is synced. |
This comment has been minimized.
This comment has been minimized.
KisaragiEffective
commented
Apr 13, 2023
It's merged 🚀 |
Can you please squash your commits? |
KisaragiEffective
commented
Apr 13, 2023
Sure! However, I'd like to rebase (and squash) after stdarch update is landed in order to reduce force-push, so I'll submit another PR first. |
submitted #110285, this PR remains to be a draft. Once it has approved and merged, I will rebase and squash commit. |
bors
commented
Apr 17, 2023
☔ The latest upstream changes (presumably #110458) made this pull request unmergeable. Please resolve the merge conflicts. |
…Amanieu stdarch: update submodule We need [this commit](rust-lang/stdarch@cf3deea) introduced by [stdarch#1411](rust-lang/stdarch#1411) in order to merge rust-lang#110189.
…anieu stdarch: update submodule We need [this commit](rust-lang/stdarch@cf3deea) introduced by [stdarch#1411](rust-lang/stdarch#1411) in order to merge rust-lang#110189. Note to myself: `git pull && git submodule update --remote library/stdarch`
8488fd0 to
1810b24Compare56f75aa to
04f6320Compare
This comment has been minimized.
This comment has been minimized.
KisaragiEffective
commented
Jun 19, 2023
It looks like another PR to stdarch is needed. |
| assert_eq::<i32>(f32::INFINITY as i32, i32::MAX); | ||
| assert_eq::<i32>(f32::NEG_INFINITY as i32, i32::MIN); | ||
| assert_eq::<i32>(f32::NAN as i32, 0); | ||
| assert_eq::<i32>((-f32::NAN) as i32, 0); |
There was a problem hiding this comment.
I don't think we should lint against (-expr) as i32. Looking at -expr as i32 I have no idea whether the as or the - are executed first, and I might care about that (in particular when casting to an unsigned type). (The formatting indicates that - goes first but I don't know if that actually matches how this is parsed.)
Parentheses to disambiguate parsing precedence are a good thing, we should not steer people away from them.
There was a problem hiding this comment.
Thanks! The diff in the Miri test can hopefully be removed then. :)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rust-log-analyzer
commented
Jun 20, 2023
The job Click to see the possible cause of the failure (guessed by this bot) |
| // cast is left-assoc | ||
| let _ = (true as u8) as u16; | ||
| //~^ WARN unnecessary parentheses around cast expression | ||
| // should not fire |
There was a problem hiding this comment.
Please add unary - to this block (and other unary operator as well?)
There was a problem hiding this comment.
Does your intention include *expr as Ty and &expr as Ty?
bors
commented
Jun 29, 2023
☔ The latest upstream changes (presumably #113151) made this pull request unmergeable. Please resolve the merge conflicts. |
Dylan-DPC
commented
Aug 8, 2023
@KisaragiEffective any updates on it? |
Dylan-DPC
commented
Feb 8, 2024
Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks |
closerust-lang/rust-clippy#10557.
closerust-lang/rust-clippy#10625.
@llogiq suggested submit PR to solve the issue.