Remove uses of cfg({any()/all()})#149791
Conversation
|
Some changes occurred in check-cfg diagnostics cc @Urgau Some changes occurred in compiler/rustc_attr_parsing |
|
r? @chenyukang rustbot has assigned @chenyukang. Use |
This comment has been minimized.
This comment has been minimized.
d418aea to
cb5acfc
Compare
|
r? jdonszelmann |
|
Can you split-off the As for the warning it should probably be a lint (so it can be enabled and disabled), but either way the warning will need to go through T-lang first, with a nomination and maybe a crater run. |
cb5acfc to
cf79ee7
Compare
|
With my T-lang hat on, this seems reasonable. Nominating for discussion of the new lint. |
This comment has been minimized.
This comment has been minimized.
|
Running into the above error where (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => {
#[cfg(all($($m,)* not(any($($not),*))))] cfg_if! { @__identity $($tokens)* }
cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
};is invoked with no |
cf79ee7 to
06d836b
Compare
|
This PR modifies Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
Implemented as a pre-expansion early lint |
This comment has been minimized.
This comment has been minimized.
…elmann
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang#149791 (comment)
Tracking issue: rust-lang#131204
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang#149791 cc `@Urgau`
…elmann
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang#149791 (comment)
Tracking issue: rust-lang#131204
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang#149791 cc ``@Urgau``
…elmann
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang#149791 (comment)
Tracking issue: rust-lang#131204
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang#149791 cc ```@Urgau```
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang#149791 cc ````@Urgau````
…elmann
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang#149791 (comment)
Tracking issue: rust-lang#131204
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang#149791 cc `````@Urgau`````
…elmann
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang#149791 (comment)
Tracking issue: rust-lang#131204
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang#149791 cc ```````@Urgau```````
Rollup of 7 pull requests Successful merges: - #149655 (bootstrap: add rustc-dev install target) - #149789 (Cleanup in the attribute parsers) - #149791 (Remove uses of `cfg({any()/all()})`) - #149792 (Suggest `cfg(false)` instead of `cfg(FALSE)`) - #149883 (add regression test for `proc_macro` error subdiagnostics) - #149884 (Clippy subtree update) - #149896 (Add myself(makai410) to the review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #149791 - clubby789:cfg-bool-lints, r=jdonszelmann Remove uses of `cfg({any()/all()})` ~~This implements the followup warning suggested in rust-lang/rfcs#3695 ~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~ #149791 (comment) Tracking issue: #131204
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang/rust#149791 (comment)
Tracking issue: rust-lang/rust#131204
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang/rust#149791 (comment)
Tracking issue: rust-lang/rust#131204
Suggest `cfg(false)` instead of `cfg(FALSE)` Split from rust-lang/rust#149791 cc ```````@Urgau```````
Rollup of 7 pull requests Successful merges: - rust-lang/rust#149655 (bootstrap: add rustc-dev install target) - rust-lang/rust#149789 (Cleanup in the attribute parsers) - rust-lang/rust#149791 (Remove uses of `cfg({any()/all()})`) - rust-lang/rust#149792 (Suggest `cfg(false)` instead of `cfg(FALSE)`) - rust-lang/rust#149883 (add regression test for `proc_macro` error subdiagnostics) - rust-lang/rust#149884 (Clippy subtree update) - rust-lang/rust#149896 (Add myself(makai410) to the review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang/rust#149791 (comment)
Tracking issue: rust-lang/rust#131204
Rollup of 7 pull requests Successful merges: - rust-lang/rust#149655 (bootstrap: add rustc-dev install target) - rust-lang/rust#149789 (Cleanup in the attribute parsers) - rust-lang/rust#149791 (Remove uses of `cfg({any()/all()})`) - rust-lang/rust#149792 (Suggest `cfg(false)` instead of `cfg(FALSE)`) - rust-lang/rust#149883 (add regression test for `proc_macro` error subdiagnostics) - rust-lang/rust#149884 (Clippy subtree update) - rust-lang/rust#149896 (Add myself(makai410) to the review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Remove uses of `cfg({any()/all()})`
~~This implements the followup warning suggested in rust-lang/rfcs#3695
~~Lint against an empty `cfg(any/all)`, suggest the boolean literal equivalents.~~
rust-lang/rust#149791 (comment)
Tracking issue: rust-lang/rust#131204
Rollup of 7 pull requests Successful merges: - rust-lang/rust#149655 (bootstrap: add rustc-dev install target) - rust-lang/rust#149789 (Cleanup in the attribute parsers) - rust-lang/rust#149791 (Remove uses of `cfg({any()/all()})`) - rust-lang/rust#149792 (Suggest `cfg(false)` instead of `cfg(FALSE)`) - rust-lang/rust#149883 (add regression test for `proc_macro` error subdiagnostics) - rust-lang/rust#149884 (Clippy subtree update) - rust-lang/rust#149896 (Add myself(makai410) to the review rotation) r? `@ghost` `@rustbot` modify labels: rollup
This implements the followup warning suggested in rust-lang/rfcs#3695Lint against an emptycfg(any/all), suggest the boolean literal equivalents.#149791 (comment)
Tracking issue: #131204