-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Conversation
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. |
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.
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 👍
8f0a139
to
06f6a77
Compare
Done. @rustbot ready |
after the last nit, you can approve this pr yourself using @bors delegate+ |
📌 Commit 06f6a776c4afd36fa3bc94ccd81e9dcc1072a901 has been approved by It is now in the queue for this repository. |
06f6a77
to
c3a71ed
Compare
Added the extra test. Thanks for the review! @bors r=lcnr rollup |
@PossiblyAShrub: 🔑 Insufficient privileges: Not in reviewers |
@PossiblyAShrub: 🔑 Insufficient privileges: not in try users |
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 |
weird, not sure why the @bors r+ rollup thanks |
…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?
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
Fixes: #96606.
I am not sure what the best term for "index expression" is. Is there a better term we could use?