Files
rust/compiler/rustc_feature
Jonathan Brouwer 854fdba980 Rollup merge of #157931 - mejrs:feature_macro, r=jieyouxu
Improve `declare_features!` macro error

I got mildly annoyed when I went to add a new feature, and the fix for this is relatively simple.

Current error:
```
error[E0425]: cannot find value `better_rust` in module `sym`
   --> compiler\rustc_feature\src\unstable.rs:240:16
    |
157 |                 name: sym::$feature,
    |                            -------- due to this macro variable
...
240 |     (internal, better_rust, "2.0.0", None),
    |                ^^^^^^^^^^^ not found in `sym`

For more information about this error, try `rustc --explain E0425`
```

Previous error:
```
error[E0425]: cannot find value `better_rust` in module `sym`
   --> compiler\rustc_feature\src\unstable.rs:240:16
    |
157 |                 name: sym::$feature,
    |                            -------- due to this macro variable
...
240 |     (internal, better_rust, "2.0.0", None),
    |                ^^^^^^^^^^^ not found in `sym`

error[E0531]: cannot find unit struct, unit variant or constant `better_rust` in module `sym`
   --> compiler\rustc_feature\src\unstable.rs:240:16
    |
157 |                 name: sym::$feature,
    |                            -------- due to this macro variable
...
240 |     (internal, better_rust, "2.0.0", None),
    |                ^^^^^^^^^^^ not found in `sym`

Some errors have detailed explanations: E0425, E0531.
```
2026-06-17 11:33:51 +02:00
..