diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-05 18:59:01 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-16 08:15:30 +1100 |
| commit | 41b689948736cc79f35b6002c040513291dcd7c2 (patch) | |
| tree | d758be198563371e8bc52c8909596a65f9edb405 /compiler/rustc_lint/src/expect.rs | |
| parent | 64368d0279c41699fffd7980304488d65a42ba32 (diff) | |
| download | rust-41b689948736cc79f35b6002c040513291dcd7c2.tar.gz rust-41b689948736cc79f35b6002c040513291dcd7c2.zip | |
Remove `rustc_feature::State`.
`State` is used to distinguish active vs accepted vs removed features. However, these can also be distinguished by their location, in `ACTIVE_FEATURES`, `ACCEPTED_FEATURES`, and `REMOVED_FEATURES`. So this commit removes `State` and moves the internals of its variants next to the `Feature` in each element of `*_FEATURES`, introducing new types `ActiveFeature` and `RemovedFeature`. (There is no need for `AcceptedFeature` because `State::Accepted` had no fields.) This is a tighter type representation, avoids the need for some runtime checks, and makes the code a bit shorter.
Diffstat (limited to 'compiler/rustc_lint/src/expect.rs')
0 files changed, 0 insertions, 0 deletions
