Add future-incompat warning against keywords in cfgs and add raw-idents #14671
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.
What does this PR try to resolve?
This PR tries to address this thread #14649 (comment) in #14649 regarding
cfg(true)
/cfg(false)
(and keywords more generally) which are wrongly accepted1 as ident.To address this, this PR does two things:
r#true
) add suggest-it in the warningHow should we test and review this PR?
This PR should be reviewed commit-by-commit.
Tests are included in preliminary commits.
Additional information
I added a new struct for representing
Ident
s which is rawness aware.Which implied updating
cargo-platform
to0.2.0
due to the API changes.r? @epage
Footnotes
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ccfb9c894dbf14e791c8ae7e4798efd0 ↩