Skip to content
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

Emit warnings on unused parens in index expressions #107539

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

PossiblyAShrub
Copy link
Contributor

Fixes: #96606.

I am not sure what the best term for "index expression" is. Is there a better term we could use?

@rustbot
Copy link
Collaborator

rustbot commented Feb 1, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 1, 2023
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add a text for unused braces in index expressions?

Using "index expression" in the diagnostics seems good to me as that terminology is also used in the reference.

after adding that test, r=me 👍

@PossiblyAShrub
Copy link
Contributor Author

can you also add a text for unused braces in index expressions?

Done.

@rustbot ready

@lcnr
Copy link
Contributor

lcnr commented Feb 2, 2023

after the last nit, you can approve this pr yourself using @bors r=lcnr rollup.

@bors delegate+

@bors
Copy link
Contributor

bors commented Feb 2, 2023

📌 Commit 06f6a776c4afd36fa3bc94ccd81e9dcc1072a901 has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 2, 2023
@lcnr
Copy link
Contributor

lcnr commented Feb 2, 2023

@bors r- '^^ forgot that bors looks into code blocks 😅

@bors delegate+

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 2, 2023
@PossiblyAShrub
Copy link
Contributor Author

Added the extra test. Thanks for the review!

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented Feb 2, 2023

@PossiblyAShrub: 🔑 Insufficient privileges: Not in reviewers

@bors
Copy link
Contributor

bors commented Feb 2, 2023

@PossiblyAShrub: 🔑 Insufficient privileges: not in try users

@PossiblyAShrub
Copy link
Contributor Author

Hmmm. Looks like bors doesn't want to let merge this. I'll just mark it as S-waiting-on-review. (Let me know if I should do something different as I am still new to the contribution process.)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 2, 2023
@lcnr
Copy link
Contributor

lcnr commented Feb 3, 2023

weird, not sure why the delegate was ignored 😅

@bors r+ rollup

thanks

@bors
Copy link
Contributor

bors commented Feb 3, 2023

📌 Commit c3a71ed has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Feb 3, 2023
…dex, r=lcnr

Emit warnings on unused parens in index expressions

Fixes: rust-lang#96606.

I am not sure what the best term for "index expression" is. Is there a better term we could use?
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 3, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#107082 (Autotrait bounds on dyn-safe trait methods)
 - rust-lang#107427 (Add candidates for DiscriminantKind builtin)
 - rust-lang#107539 (Emit warnings on unused parens in index expressions)
 - rust-lang#107544 (Improve `TokenCursor`.)
 - rust-lang#107585 (Don't cause a cycle when formatting query description that references a FnDef)
 - rust-lang#107633 (Fix suggestion for coercing Option<&String> to Option<&str>)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d9db357 into rust-lang:master Feb 3, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Diagnostic ER] Missing unnecessary parentheses warning
4 participants