Samuel Tardieu
bbda0c9fb5
Rollup merge of #143855 - JonathanBrouwer:omit_gdb_pretty_printer_section, r=jdonszelmann
...
Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing
Ports `#[omit_gdb_pretty_printer_section]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? ```@jdonszelmann```
2025-07-14 18:05:45 +02:00
Jakub Beránek
93c10272d0
Rollup merge of #143217 - Periodic1911:link-ordinal, r=jdonszelmann
...
Port #[link_ordinal] to the new attribute parsing infrastructure
Ports link_ordinal to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
2025-07-14 11:04:52 +02:00
Anne Stijns
75561c446a
Port #[link_ordinal] to the new attribute parsing infrastructure.
2025-07-13 11:51:01 +02:00
Jonathan Brouwer
86349e31dd
Port #[omit_gdb_pretty_printer_section] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-12 22:55:48 +02:00
Jonathan Brouwer
ef82007ed7
Port #[automatically_derived] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-12 17:48:50 +02:00
Pavel Grigorenko
e584ed0de2
Port #[rustc_coherence_is_core] to the new attribute system
2025-07-09 01:26:39 +03:00
Pavel Grigorenko
e9e64954e6
Port #[rustc_allow_incoherent_impl] to the new attribute system
2025-07-09 01:26:39 +03:00
Pavel Grigorenko
1bdf703171
Port #[rustc_paren_sugar] to the new attribute system
2025-07-09 01:26:39 +03:00
Pavel Grigorenko
507ebced16
Port #[fundamental] to the new attribute system
2025-07-09 01:26:27 +03:00
Pavel Grigorenko
12f6487d79
Port #[marker] to the new attribute system
2025-07-09 01:18:28 +03:00
Pavel Grigorenko
a57a885abc
Port #[rustc_unsafe_specialization_marker] to the new attribute system
2025-07-09 01:07:15 +03:00
Pavel Grigorenko
6193783961
Port #[rustc_specialization_trait] to the new attribute system
2025-07-09 01:07:12 +03:00
Pavel Grigorenko
813ec60744
Port #[type_const] to the new attribute system
2025-07-09 01:06:29 +03:00
Pavel Grigorenko
6f8e92d5aa
Port #[rustc_coinductive] to the new attribute system
2025-07-09 01:06:29 +03:00
Pavel Grigorenko
adb325fc16
Port #[rustc_do_not_implement_via_object] to the new attribute system
2025-07-09 01:05:21 +03:00
Pavel Grigorenko
938916d220
Port #[rustc_deny_explicit_impl] to the new attribute system
2025-07-09 01:04:35 +03:00
Pavel Grigorenko
62f58dbb2d
Port #[const_trait] to the new attribute system
2025-07-09 01:03:00 +03:00
Pavel Grigorenko
4f0b0b0f01
Port #[rustc_std_internal_symbol] to the new attribute system
2025-07-07 14:59:52 +03:00
Pavel Grigorenko
5d7771e50d
Port #[ffi_pure] to the new attribute system
2025-07-07 14:59:01 +03:00
Pavel Grigorenko
99a9fe1b22
Port #[ffi_const] to the new attribute system
2025-07-07 14:52:52 +03:00
Pavel Grigorenko
bb8b741c32
Port #[export_stable] to the new attribute system
2025-07-07 14:33:20 +03:00
Jonathan Brouwer
244d64e60b
Port #[path] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-06 22:19:16 +02:00
Jonathan Brouwer
ef3d7741e5
Move check for new attribute to check_builtin_meta_item
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-06 22:18:58 +02:00
Jonathan Brouwer
2d8ffff10a
Port #[ignore] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-05 21:23:09 +02:00
Jonathan Brouwer
027126ce0b
Port #[non_exhaustive] to the new attribute parsing infrastructure
2025-07-04 20:30:42 +02:00
Matthias Krüger
f3e7ec5560
Rollup merge of #143400 - GrigorenkoPV:attributes/lints, r=jdonszelmann
...
Port `#[rustc_pass_by_value]` to the new attribute system
Part of rust-lang/rust#131229
r? `@oli-obk`
2025-07-04 16:22:36 +02:00
Pavel Grigorenko
ef4dece2cb
Port #[rustc_pass_by_value] to the new attribute system
2025-07-04 00:07:56 +03:00
Jonathan Brouwer
fee5e3c3aa
Port #[no_implicit_prelude] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-03 20:59:40 +02:00
Jonathan Brouwer
3d5d72b761
Port #[target_feature] to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-03 07:54:19 +02:00
Jonathan Brouwer
57a5e3b6d2
Fix duplicate errors for link_section, rustc_layout_scalar_valid_range_start and rustc_layout_scalar_valid_range_end
2025-07-01 16:40:47 +02:00
Jonathan Brouwer
0b67d14b31
Fix #[rustc_macro_transparency] giving two errors
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-01 16:10:07 +02:00
Jonathan Brouwer
86b54d5729
Fix double error for export_name
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-07-01 16:10:02 +02:00
Jonathan Brouwer
1249c14232
Port #[link_name] to the new attribute parsing infrastructure
...
Co-authored-by: Anne Stijns <anstijns@gmail.com >
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-06-28 13:53:37 +02:00
Jana Dönszelmann
5d44fdd972
Rewrite #[track_caller]
2025-06-24 23:00:31 +02:00
Pavel Grigorenko
aa80a2b62c
Port #[rustc_skip_during_method_dispatch] to the new attribute system
2025-06-23 22:48:20 +03:00
Jonathan Brouwer
b24df42488
Port #[must_use] to new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com >
2025-06-22 14:51:58 +02:00
Jana Dönszelmann
b9107a83a1
expected word diagnostic test
2025-06-20 15:06:29 +02:00
Trevor Gross
bab4ca914e
Rollup merge of #138291 - jdonszelmann:optimize-attr, r=oli-obk
...
rewrite `optimize` attribute to use new attribute parsing infrastructure
r? ```@oli-obk```
I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :)
Waiting on #138165 first
2025-06-20 02:50:37 -04:00
Jana Dönszelmann
b64fd13a04
convert the optimize attribute to a new parser
2025-06-18 13:48:42 +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
Folkert de Vries
2c8257493d
use correct edition when warning for unsafe attributes
...
If an attribute is re-emitted by a macro, the incorrect edition was used to emit warnings for unsafe attributes
2025-06-09 21:55:22 +02:00
Jieyou Xu
eb3a8e5b81
Make attribute safety validation logic more obvious
2025-05-04 21:44:50 +08:00
Urgau
f4e1ec111c
Report the unsafe_attr_outside_unsafe lint at the closest node
2025-05-03 16:10:25 +02:00
Folkert de Vries
41ddf86722
Make #[naked] an unsafe attribute
2025-04-19 00:03:35 +02:00
Folkert de Vries
cb22c1d5e9
Allow (but don't require) #[unsafe(naked)] so that compiler-builtins can upgrade to it
2025-04-14 20:44:15 +02:00
Folkert de Vries
f472cc8cd4
error on unsafe attributes in pre-2024 editions
...
the `no_mangle`, `link_section` and `export_name` attributes are exceptions, and can still be used without an unsafe in earlier editions
2025-04-13 01:22:59 +02:00
Vadim Petrochenkov
92d802eda6
expand: Leave traces when expanding cfg attributes
2025-03-26 15:30:12 +03:00