Logical right and left shift diagnostics.#102067
Logical right and left shift diagnostics.#102067moonheart08 wants to merge 4 commits intorust-lang:masterfrom
Conversation
|
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
|
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
| .arithmetic_left_shift_operator_invalid = `<<<` is not a valid left shift operator, consider shifting normally and fixing the sign as needed. | ||
| .arithmetic_right_shift_operator_invalid = `>>>` is not a valid right shift operator, consider casting to a signed integer and right shifting normally. |
There was a problem hiding this comment.
We don't end sentences with period (nor we capitalize the first letter in sentences)
| .arithmetic_left_shift_operator_invalid = `<<<` is not a valid left shift operator, consider shifting normally and fixing the sign as needed. | |
| .arithmetic_right_shift_operator_invalid = `>>>` is not a valid right shift operator, consider casting to a signed integer and right shifting normally. | |
| .arithmetic_left_shift_operator_invalid = `<<<` is not a valid left shift operator, consider shifting normally and fixing the sign as needed | |
| .arithmetic_right_shift_operator_invalid = `>>>` is not a valid right shift operator, consider casting to an unsigned integer and right shifting normally |
I would prefer if the consider... text was instead a note, separate from the main label
There was a problem hiding this comment.
I agree with both of these comments.
| .arithmetic_left_shift_operator_invalid = `<<<` is not a valid left shift operator, consider shifting normally and fixing the sign as needed. | ||
| .arithmetic_right_shift_operator_invalid = `>>>` is not a valid right shift operator, consider casting to a signed integer and right shifting normally. |
There was a problem hiding this comment.
I agree with both of these comments.
|
r? @estebank |
|
☔ The latest upstream changes (presumably #101846) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Hi, I've seen you changed some diagnostic structs in your PR. After #103345, the way we refer to fluent messages changed. They are now in a flat namespace with the same identifier as in the fluent file. For example, |
|
Ah shoot, this slipped under my radar. I'll put finishing this on my calender. |
|
Switching to waiting on author to incorporate changes. Feel free to request a review with @rustbot author |
|
@moonheart08 any updates on this? |
|
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 |
This adds lints for
<<<and>>>. They explicitly do not suggest replacements as I could not figure out a simple way to do so for>>>, and for<<<the replacement is subjective (it could be<<, but that doesn't preserve sign.)