mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
ded0a9e15f
Improve check-cfg implementation This PR makes multiple improvements into the implementation of check-cfg, it is a prerequisite to a follow-up PR that will introduce a simpler and more explicit syntax. The 2 main area of improvements are: 1. Internal representation of expected values: - now uses `FxHashSet<Option<Symbol>>` instead of `FxHashSet<Symbol>`, it made the no value expected case only possible when no values where in the `HashSet` which is now represented as `None` (same as cfg represent-it). - a enum with `Some` and `Any` makes it now clear if some values are expected or not, necessary for `feature` and `target_feature`. 2. Diagnostics: Improve the diagnostics in multiple case and fix case where a missing value could have had a new name suggestion instead of the value diagnostic; and some drive by improvements I highly recommend reviewing commit by commit. r? `@petrochenkov` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |