summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing/src/attributes
AgeCommit message (Collapse)AuthorLines
2025-03-25Avoid `kw::Empty` when dealing with `rustc_allowed_through_unstable_modules`.Nicholas Nethercote-6/+2
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-19add rustc_macro_edition_2021Jana Dönszelmann-0/+20
2025-02-24Introduce new-style attribute parsers for several attributesJana Dönszelmann-645/+699
note: compiler compiles but librustdoc and clippy don't
2025-02-24Introduce new parsing infrastructure and types for parsed attributesJana Dönszelmann-2/+132
fixup docs in parser
2025-02-24Change span field accesses to method callsJana Dönszelmann-8/+21
2025-02-22Greatly simplify lifetime captures in edition 2024Michael Goulet-12/+12
2025-02-02rustc_allowed_through_unstable_modules: require deprecation messageRalf Jung-7/+11
2025-01-19Run `clippy --fix` for `unnecessary_map_or` lintYotam Ofek-1/+1
2025-01-15allowed_through_unstable_modules: support showing a deprecation message when ↵Ralf Jung-8/+13
the unstable module name is used
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-10/+7
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-12-16rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structuresJonathan Dönszelmann-0/+1162