about summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing/src/attributes/deprecation.rs
AgeCommit message (Collapse)AuthorLines
2025-08-30Remove incorrect FIXMEJonathan Brouwer-1/+1
2025-08-21Introduce a prelude for very common imports across dozens of filesJana Dönszelmann-14/+9
2025-08-21refactor target checking, move out of context.rs and rename MaybeWarn to PolicyJana Dönszelmann-2/+4
2025-08-16Fix deprecation attribute on foreign statics & typesJonathan Brouwer-0/+2
2025-08-14Specify the list of allowed targets per attributeJonathan Brouwer-2/+27
2025-08-11Allow attr entries to declare list of alternatives for `List` and ↵Esteban Küber-1/+1
`NamedValueStr` Modify `AttributeTemplate` to support list of alternatives for list and name value attribute styles. Suggestions now provide more correct suggested code: ``` error[E0805]: malformed `used` attribute input --> $DIR/used_with_multi_args.rs:3:1 | LL | #[used(compiler, linker)] | ^^^^^^------------------^ | | | expected a single argument here | help: try changing it to one of the following valid forms of the attribute | LL - #[used(compiler, linker)] LL + #[used(compiler)] | LL - #[used(compiler, linker)] LL + #[used(linker)] | LL - #[used(compiler, linker)] LL + #[used] | ``` instead of the prior "masking" of the lack of this feature by suggesting pipe-separated lists: ``` error[E0805]: malformed `used` attribute input --> $DIR/used_with_multi_args.rs:3:1 | LL | #[used(compiler, linker)] | ^^^^^^------------------^ | | | expected a single argument here | help: try changing it to one of the following valid forms of the attribute | LL - #[used(compiler, linker)] LL + #[used(compiler|linker)] | LL - #[used(compiler, linker)] LL + #[used] | ```
2025-07-31remove rustc_attr_data_structuresJana Dönszelmann-1/+1
2025-07-09Use "Innermost" & "Outermost" terminology for `AttributeOrder`Pavel Grigorenko-1/+1
2025-06-17make error codes reflect reality betterJana Dönszelmann-52/+48
2025-06-17use consistent attr errors in all attribute parsersJana Dönszelmann-8/+7
2025-06-17fix bugs in inline/force_inline and diagnostics of all attr parsersJana Dönszelmann-0/+6
2025-06-12remove 'static in some placesJana Dönszelmann-1/+1
2025-06-12introduce new lint infraJana Dönszelmann-8/+8
lint on duplicates during attribute parsing To do this we stuff them in the diagnostic context to be emitted after hir is constructed
2025-06-12Start using new diagnostic logic on all existing `single` parsersJonathan Dönszelmann-10/+2
2025-06-12introduce duplicate attribute diagnostic logicJana Dönszelmann-4/+5
2025-06-04Rollup merge of #141271 - nnethercote:attr-streamline, r=jdonszelmannMatthias Krüger-2/+2
Streamline some attr parsing APIs r? ``@jdonszelmann``
2025-05-21Rename `MetaItemParser::path_without_args` as `MetaItemParser::path`.Nicholas Nethercote-2/+2
And avoid the clone.
2025-05-20Avoid `rustc_span::` qualifiers.Nicholas Nethercote-2/+2
In several files they are entirely unnecessary, with the relevant names already imported. And in a few I have added the necessary `use` item.
2025-05-07Eliminate `word_or_empty` methods.Nicholas Nethercote-15/+11
To get rid of the `Ident::empty` uses. This requires introducing `PathParser::word_sym`, as an alternative to `PathParser::word`.
2025-02-24Introduce new-style attribute parsers for several attributesJana Dönszelmann-106/+108
note: compiler compiles but librustdoc and clippy don't
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-2/+1
`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/+149