-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 unused_parens
triggers on macro by example code
#66983
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Co-Authored-By: lzutao <[email protected]>
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Based on the discussion in #66295, r=me once my nitpick is addressed or answered. |
@bors r+ |
📌 Commit ab3f4fd has been approved by |
…bank Fix `unused_parens` triggers on macro by example code Fix rust-lang#66295 Unfortunately this does also break [an existing test](https://github.com/rust-lang/rust/blob/4787e97475de6be9487e3d9255a9c2d3c0bf9252/src/test/ui/lint/issue-47775-nested-macro-unnecessary-parens-arg.rs#L22). I'm not sure how to handle that, because that seems to be quite similar to the allowed cases If this gets accepted it would be great to backport this fix to beta.
Rollup of 8 pull requests Successful merges: - #62514 (Clarify `Box<T>` representation and its use in FFI) - #66983 (Fix `unused_parens` triggers on macro by example code) - #67215 (Fix `-Z print-type-sizes`'s handling of zero-sized fields.) - #67230 (Remove irelevant comment on `register_dtor`) - #67236 (resolve: Always resolve visibilities on impl items) - #67237 (Some small readability improvements) - #67238 (Small std::borrow::Cow improvements) - #67239 (Make TinyList::remove iterate instead of recurse) Failed merges: r? @ghost
Accepted for backport in today's design meeting |
[beta] Beta backports Backporting the following pull requests: * resolve: Always resolve visibilities on impl items #67236 * resolve: Resolve visibilities on fields with non-builtin attributes #67106 * E0023: handle expected != tuple pattern type #67044 * Fix `unused_parens` triggers on macro by example code #66983 * Fix some issues with attributes on unnamed fields #66669 * Ensure that we get a hard error on generic ZST constants if their bodies #67134 (via #67297) Some of these conflicted on merge, I resolved where possible, sometimes by cherry-picking a commit or two more from the relevant PRs. Since those changes are necessary though for backport to proceed (otherwise not even std/core compile), seems fine -- they're fairly minor cleanups anyway.
Fix #66295
Unfortunately this does also break an existing test. I'm not sure how to handle that, because that seems to be quite similar to the allowed cases
If this gets accepted it would be great to backport this fix to beta.