Allow the unused_macro_rules lint for now#97032
Merged
bors merged 1 commit intorust-lang:masterfrom May 15, 2022
Merged
Conversation
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
|
Code example in the lint description needs to be updated, CI fails due to it. |
Member
Author
|
@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.
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit 015e2ae has been approved by |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
May 14, 2022
…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).
Member
|
beta-nominating for 1.62 backport (necessary if it lands after #97016, which seems likely). |
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
May 15, 2022
…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).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 15, 2022
…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
github-actions bot
pushed a commit
to gnoliyil/fuchsia
that referenced
this pull request
May 17, 2022
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 <josephry@google.com> > Fuchsia-Auto-Submit: Dan Johnson <computerdruid@google.com> > Reviewed-by: Tyler Mandry <tmandry@google.com> > Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Bug: 100318 Change-Id: I2ebf0b0e9c9e28d8a2588fc92dfe7428c77ca4cf Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679988 Reviewed-by: RubberStamper 🤖 <android-build-ayeaye@system.gserviceaccount.com> Commit-Queue: Dan Johnson <computerdruid@google.com> Reviewed-by: Joseph Ryan <josephry@google.com>
Contributor
ehuss
pushed a commit
to ehuss/rust
that referenced
this pull request
Jun 1, 2022
…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).
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 2, 2022
[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 was referenced Jun 7, 2022
naturallymitchell
pushed a commit
to naturallymitchell/fuchsia-storage
that referenced
this pull request
Jun 10, 2022
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 <josephry@google.com> > Fuchsia-Auto-Submit: Dan Johnson <computerdruid@google.com> > Reviewed-by: Tyler Mandry <tmandry@google.com> > Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Bug: 100318 Change-Id: I2ebf0b0e9c9e28d8a2588fc92dfe7428c77ca4cf Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/679988 Reviewed-by: RubberStamper 🤖 <android-build-ayeaye@system.gserviceaccount.com> Commit-Queue: Dan Johnson <computerdruid@google.com> Reviewed-by: Joseph Ryan <josephry@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).