19 Commits

Author SHA1 Message Date
Jonathan Brouwer
f0addd040a
Make tool-only suggestion to remove attributes on invalid targets 2025-08-19 09:03:07 +02:00
Jonathan Brouwer
744d39ebe6
Allow attribute parsers to specify a list of allowed targets
Every acceptor gets an `ALLOWED_TARGETS` specification which can specify per target whether it is allowed, warned, or errored.
2025-08-14 18:11:56 +02:00
Esteban Küber
6bb29af766 Add link to invalid repr error 2025-08-11 16:00:49 +00:00
tiif
dd067a689a Lint against having both #[unstable_feature_bound] and #[stable] on the same item 2025-07-15 13:48:30 +00:00
Anne Stijns
75561c446a Port #[link_ordinal] to the new attribute parsing infrastructure. 2025-07-13 11:51:01 +02:00
Dillon Amburgey
ba4235bc85 fix: correct typo in attr_parsing_previously_accepted message key 2025-07-08 18:45:36 -05:00
Jonathan Brouwer
3fa0ec91d8
Rewrite empty attribute lint
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06 09:51:35 +02:00
Anne Stijns
54cec0cf5a Port #[link_section] to the new attribute parsing infrastructure 2025-06-29 16:23:46 +02:00
Jonathan Brouwer
287d9afce7
Port #[export_name] to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-26 08:50:42 +02:00
Jana Dönszelmann
5c0a625205
move naked checks out of check_attr.rs 2025-06-23 12:22:57 +02:00
Folkert de Vries
1fdf2b5620
add #[align] attribute
Right now it's used for functions with `fn_align`, in the future it will
get more uses (statics, struct fields, etc.)
2025-06-18 12:37:08 +02:00
Jana Dönszelmann
5ab5f8a24a
make error codes reflect reality better 2025-06-17 23:22:51 +02:00
Jana Dönszelmann
672452d573
use consistent attr errors in all attribute parsers 2025-06-17 23:19:31 +02:00
Jana Dönszelmann
ee976bbbca
fix bugs in inline/force_inline and diagnostics of all attr parsers 2025-06-17 23:19:31 +02:00
Jana Dönszelmann
e6a5f281ec
add error message for unused duplicate 2025-06-12 09:56:47 +02:00
Jana Dönszelmann
6072207a11
introduce new lint infra
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-12 09:56:47 +02:00
Jana Dönszelmann
7e0f5b5016
Introduce new-style attribute parsers for several attributes
note: compiler compiles but librustdoc and clippy don't
2025-02-24 14:31:17 +01:00
Jana Dönszelmann
dbd3b7928e
Introduce new parsing infrastructure and types for parsed attributes
fixup docs in parser
2025-02-24 14:26:06 +01:00
Jonathan Dönszelmann
efb98b6552
rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures 2024-12-16 19:08:19 +01:00