rust/compiler/rustc_attr_parsing/src/attributes
Nicholas Nethercote 867da30cc7 Avoid kw::Empty when dealing with rustc_allowed_through_unstable_modules.
The existing code produces `Some(kw::Empty)` for these invalid forms:

- a non-name-value, e.g. `#[rustc_allowed_through_unstable_modules]`

- a non-string arg, e.g. `#[rustc_allowed_through_unstable_modules = 3]`

The new code avoids the `kw::Empty` and is a little shorter. It will
produce `None` in those cases, which means E0789 won't be produced if
the `stable` attribute is missing for these invalid forms. This doesn't
matter, because these invalid forms will trigger an "malformed
`rustc_allowed_through_unstable_modules` attribute" anyway.
2025-03-25 16:48:03 +11:00
..
allow_unstable.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
cfg.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
confusables.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
deprecation.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
mod.rs add rustc_macro_edition_2021 2025-03-19 17:37:35 +01:00
repr.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
rustc.rs add rustc_macro_edition_2021 2025-03-19 17:37:35 +01:00
stability.rs Avoid kw::Empty when dealing with rustc_allowed_through_unstable_modules. 2025-03-25 16:48:03 +11:00
transparency.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00
util.rs Introduce new-style attribute parsers for several attributes 2025-02-24 14:31:17 +01:00