-
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
Allow the unused_macro_rules lint for now #97032
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Code example in the lint description needs to be updated, CI fails due to it. |
@petrochenkov sorry about that, I'm getting symbol errors when trying to locally test rustc, so I can't do |
This comment has been minimized.
This comment has been minimized.
This makes the transition easier as e.g. allow directives won't fire the unknown lint warning once it is turned to warn by default in the future. This is especially important compared to other lints in the unused group because the _ prefix trick doesn't exist for macro rules, so allowing is the only option (either of unused_macro_rules, or of the entire unused group, but that is not as informative to readers). Allowing the lint also makes it possible to work on possible heuristics for disabling the macro in specific cases.
@bors r+ rollup |
📌 Commit 015e2ae has been approved by |
…enkov Allow the unused_macro_rules lint for now It was newly added by rust-lang#96150 with warn by default, which is great as it gave exposure to the community, and their feedback gave me ideas for improvements. Allowing the lint is good for two reasons: * It makes the transition easier as e.g. allow directives won't fire the unknown lint warning once it is turned to warn by default in the future. The [commit that allowed the lint in fuchsia](https://fuchsia.googlesource.com/fuchsia/+/9d8f96517c3963de2f0e25598fd36061914524cd%5E%21/) had to allow unknown lints for example. This is especially important compared to other lints in the unused group, because the _ prefix trick doesn't exist for macro rules, allowing is the only option (either of unused_macro_rules, or of the entire unused group, but that is not as informative to readers). Allowing the lint also makes it possible to work on possible heuristics for disabling the macro in specific cases. * It gives time for implementing heuristics for when to suppress the lint, e.g. when `compile_error!` is invoked by that arm (so it's only there to yield an error). See: rust-lang#96150 (comment) I would also like this to be backported to the 1.62 beta branch (cc rust-lang#97016).
beta-nominating for 1.62 backport (necessary if it lands after #97016, which seems likely). |
…enkov Allow the unused_macro_rules lint for now It was newly added by rust-lang#96150 with warn by default, which is great as it gave exposure to the community, and their feedback gave me ideas for improvements. Allowing the lint is good for two reasons: * It makes the transition easier as e.g. allow directives won't fire the unknown lint warning once it is turned to warn by default in the future. The [commit that allowed the lint in fuchsia](https://fuchsia.googlesource.com/fuchsia/+/9d8f96517c3963de2f0e25598fd36061914524cd%5E%21/) had to allow unknown lints for example. This is especially important compared to other lints in the unused group, because the _ prefix trick doesn't exist for macro rules, allowing is the only option (either of unused_macro_rules, or of the entire unused group, but that is not as informative to readers). Allowing the lint also makes it possible to work on possible heuristics for disabling the macro in specific cases. * It gives time for implementing heuristics for when to suppress the lint, e.g. when `compile_error!` is invoked by that arm (so it's only there to yield an error). See: rust-lang#96150 (comment) I would also like this to be backported to the 1.62 beta branch (cc rust-lang#97016).
…askrgr Rollup of 3 pull requests Successful merges: - rust-lang#96958 (Improve settings menu display and remove theme menu) - rust-lang#97032 (Allow the unused_macro_rules lint for now) - rust-lang#97041 (Fix `download-ci-llvm` NixOS patching for `.so`s.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This reverts commit 9d8f965. Reason for revert: lint is allow-by-default after rust-lang/rust#97032 Original change's description: > [rust] allow unused-macro-rules to unblock toolchain roll > > Bug: 100318 > Change-Id: Ided9428282c66e63cda934a5f456223750703179 > Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679506 > Reviewed-by: Joseph Ryan <[email protected]> > Fuchsia-Auto-Submit: Dan Johnson <[email protected]> > Reviewed-by: Tyler Mandry <[email protected]> > Commit-Queue: Auto-Submit <[email protected]> Bug: 100318 Change-Id: I2ebf0b0e9c9e28d8a2588fc92dfe7428c77ca4cf Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679988 Reviewed-by: RubberStamper 🤖 <[email protected]> Commit-Queue: Dan Johnson <[email protected]> Reviewed-by: Joseph Ryan <[email protected]>
…enkov Allow the unused_macro_rules lint for now It was newly added by rust-lang#96150 with warn by default, which is great as it gave exposure to the community, and their feedback gave me ideas for improvements. Allowing the lint is good for two reasons: * It makes the transition easier as e.g. allow directives won't fire the unknown lint warning once it is turned to warn by default in the future. The [commit that allowed the lint in fuchsia](https://fuchsia.googlesource.com/fuchsia/+/9d8f96517c3963de2f0e25598fd36061914524cd%5E%21/) had to allow unknown lints for example. This is especially important compared to other lints in the unused group, because the _ prefix trick doesn't exist for macro rules, allowing is the only option (either of unused_macro_rules, or of the entire unused group, but that is not as informative to readers). Allowing the lint also makes it possible to work on possible heuristics for disabling the macro in specific cases. * It gives time for implementing heuristics for when to suppress the lint, e.g. when `compile_error!` is invoked by that arm (so it's only there to yield an error). See: rust-lang#96150 (comment) I would also like this to be backported to the 1.62 beta branch (cc rust-lang#97016).
[beta] Beta backports * Allow the unused_macro_rules lint for now rust-lang#97032 * Fix some typos in arg checking algorithm rust-lang#97303 * rustc: Fix ICE in native library error reporting rust-lang#97328 * Cargo: * Fix `cargo publish -p spec` rust-lang/cargo#10707
This reverts commit 5909ed0. Reason for revert: lint is allow-by-default after rust-lang/rust#97032 Original change's description: > [rust] allow unused-macro-rules to unblock toolchain roll > > Bug: 100318 > Change-Id: Ided9428282c66e63cda934a5f456223750703179 > Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679506 > Reviewed-by: Joseph Ryan <[email protected]> > Fuchsia-Auto-Submit: Dan Johnson <[email protected]> > Reviewed-by: Tyler Mandry <[email protected]> > Commit-Queue: Auto-Submit <[email protected]> Bug: 100318 Change-Id: I2ebf0b0e9c9e28d8a2588fc92dfe7428c77ca4cf Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679988 Reviewed-by: RubberStamper 🤖 <[email protected]> Commit-Queue: Dan Johnson <[email protected]> Reviewed-by: Joseph Ryan <[email protected]>
It was newly added by #96150 with warn by default, which is great as it gave exposure to the community, and their feedback gave me ideas for improvements.
Allowing the lint is good for two reasons:
This is especially important compared to other lints in the unused group,
because the _ prefix trick doesn't exist for macro rules, allowing is the
only option (either of unused_macro_rules, or of the entire unused group,
but that is not as informative to readers). Allowing the lint also makes it
possible to work on possible heuristics for disabling the macro in specific
cases.
when
compile_error!
is invoked by that arm (so it's only there to yield an error).See: #96150 (comment)
I would also like this to be backported to the 1.62 beta branch (cc #97016).