diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-30 11:42:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-30 11:42:04 +0100 |
| commit | e930ea274e1b0cdc9f69b0e57f71c3893204aca6 (patch) | |
| tree | a90a15f8ca2d060bacdc2013775b32ada2582b0e /compiler/rustc_middle/src | |
| parent | 19580d56c2f9e014e95f9d7879fe207a034aad16 (diff) | |
| parent | a25e0236df95dae9c236b66391660d7910a16d5e (diff) | |
| download | rust-e930ea274e1b0cdc9f69b0e57f71c3893204aca6.tar.gz rust-e930ea274e1b0cdc9f69b0e57f71c3893204aca6.zip | |
Rollup merge of #119425 - Urgau:check-cfg-fix-cargo-diag-bug, r=Nilstrieb
Fix invalid check-cfg Cargo feature diagnostic help
#118213 added specialized diagnostic for Cargo `feature` cfg. However when providing an empty `#[cfg(feature)]` condition the suggestion would suggest adding `feature` as a feature in `Cargo.toml` (wtf!).
This PR removes the invalid logic, which even brings a nice improvement.
```diff
--> $DIR/cargo-feature.rs:18:7
|
LL | #[cfg(feature)]
- | ^^^^^^^
+ | ^^^^^^^- help: specify a config value: `= "bitcode"`
|
= note: expected values for `feature` are: `bitcode`
- = help: consider defining `feature` as feature in `Cargo.toml`
```
The first commit add a test showing the bug and the second commit fixes the bug.
`@rustbot` label +F-check-cfg
Diffstat (limited to 'compiler/rustc_middle/src')
0 files changed, 0 insertions, 0 deletions
