You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement RFC3695: Allow boolean literals as cfg predicates (#14649)
### What does this PR try to resolve?
This PR implements rust-lang/rfcs#3695: allow
boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`.
### How should we test and review this PR?
The PR should be reviewed commit by commit and tested by looking at the
tests and using `[target.'cfg(<true/false>)']` in
`Cargo.toml`/`.cargo/config.toml`.
### Additional information
I had to bump `cargo-platform` to `0.3.0` has we are changing `CfgExpr`
enum in a semver incompatible change.
We currently have (thks to
#14671) a forward compatibility
warning against `cfg(true/false)` as identifiers instead of keywords.
~~I choose a use a `Cargo.toml` feature (for the manifest) as well as a
unstable CLI flag for the `.cargo/config.toml` part.~~
~~Given the very small (two occurrences on Github Search) for
[`cfg(true)`](https://github.com/search?q=lang%3Atoml+%2F%28%3F-i%29%5C%5Btarget%5C.%5B%27%22%5Dcfg.*true%2F&type=code)
and
[`cfg(false)`](https://github.com/search?q=lang%3Atoml+%2F%28%3F-i%29%5C%5Btarget%5C.%5B%27%22%5Dcfg.*false%2F&type=code),
I choose to gate the feature under a error and not a warning.~~
0 commit comments