171 Commits

Author SHA1 Message Date
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
bors
ad635e5d06 Auto merge of #143779 - JonathanBrouwer:automatically_derived_parser, r=oli-obk
Port `#[automatically_derived]` to the new attribute parsing infrastructure

Ports `#[automatically_derived]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163

r? `@oli-obk`
cc `@jdonszelmann`
2025-07-14 04:29:53 +00:00
Anne Stijns
75561c446a Port #[link_ordinal] to the new attribute parsing infrastructure. 2025-07-13 11:51:01 +02:00
León Orell Valerian Liehr
b0e559a976
Rollup merge of #143796 - JonathanBrouwer:fix-builtin-attribute-prefix, r=jdonszelmann
Fix ICE for parsed attributes with longer path not handled by CheckAttribute

Fixes https://github.com/rust-lang/rust/issues/137590
Fixes https://github.com/rust-lang/rust/issues/143789

r? ```@jdonszelmann```
2025-07-13 07:21:21 +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
Matthias Krüger
c8780fff6a
Rollup merge of #143403 - GrigorenkoPV:attributes/traits, r=jdonszelmann
Port several trait/coherence-related attributes the new attribute system

Part of rust-lang/rust#131229

This ports:
- `#[const_trait]`
- `#[rustc_deny_explicit_impl]`
- `#[rustc_do_not_implement_via_object]`
- `#[rustc_coinductive]`
- `#[type_const]`
- `#[rustc_specialization_trait]`
- `#[rustc_unsafe_specialization_marker]`
- `#[marker]`
- `#[fundamental]`
- `#[rustc_paren_sugar]`
- `#[rustc_allow_incoherent_impl]`
- `#[rustc_coherence_is_core]`

This also changes `#[marker]` to error on duplicates instead of warning.
cc rust-lang/rust#142838, but I don't think it matters too much, since it's unstable.

r? ``@oli-obk``
2025-07-11 19:45:22 +02:00
Jonathan Brouwer
2f05fa6fff
Fix ICE for parsed attributes with longer path not handled by CheckAttrVisitor
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-11 17:02:57 +02:00
Matthias Krüger
4b26882641
Rollup merge of #143663 - dillona:fix-typo, r=jdonszelmann
fix: correct typo in attr_parsing_previously_accepted message key
2025-07-10 15:19:32 +02:00
Dillon Amburgey
ba4235bc85 fix: correct typo in attr_parsing_previously_accepted message key 2025-07-08 18:45:36 -05:00
Pavel Grigorenko
e391578abb Use "Innermost" & "Outermost" terminology for AttributeOrder 2025-07-09 01:40:47 +03: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
a6bc8160d6 Reorder attribute parsers in traits.rs 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
Matthias Krüger
a15162061b
Rollup merge of #143603 - Periodic1911:clarify_keepfistlast, r=compiler-errors
Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`

Clarify the meaning of `KeepLast` and `KeepFirst` for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

Just a minor clarification, but me and ``@JonathanBrouwer`` have confused these two a few times so I think it's warranted.

r? ``@oli-obk``

cc ``@JonathanBrouwer``
2025-07-08 19:29:40 +02:00
Matthias Krüger
19a21289ba
Rollup merge of #143593 - mejrs:dummy, r=jdonszelmann
Port #[rustc_dummy]

r? ``@jdonszelmann``
2025-07-08 19:29:39 +02:00
Anne Stijns
6254afa5f2 Clarify the meaning of AttributeOrder::KeepFirst and AttributeOrder::KeepLast 2025-07-07 20:29:06 +02:00
mejrs
429deed03a Port #[rustc_dummy] 2025-07-07 18:16:09 +02: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
3fa0ec91d8
Rewrite empty attribute lint
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06 09:51:35 +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
Jana Dönszelmann
5026d0cd8e
Rollup merge of #142876 - JonathanBrouwer:target_feature_parser, r=oli-obk
Port `#[target_feature]` to new attribute parsing infrastructure

Ports `target_feature` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

r? ``@jdonszelmann``
2025-07-03 13:29:36 +02:00
Jana Dönszelmann
f6d37a25a9
Rollup merge of #134006 - klensy:typos, r=nnethercote
setup typos check in CI

This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying?

Also includes commits with actual typo fixes.

MCP: https://github.com/rust-lang/compiler-team/issues/817

typos check currently turned for:
* ./compiler
* ./library
* ./src/bootstrap
* ./src/librustdoc

After merging, PRs which enables checks for other crates (tools) can be implemented too.

Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr.

Check typos: `python x.py test tidy --extra-checks=spellcheck`
Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo)

Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.
2025-07-03 13:29:35 +02:00
klensy
c76d032f01 setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03: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
Matthias Krüger
2dbb9be326
Rollup merge of #142964 - GrigorenkoPV:attributes/argless, r=oli-obk
Attribute rework: a parser for single attributes without arguments

Part of rust-lang/rust#131229

r? `@jdonszelmann`

I think code (with comments) speaks for itself.

The only subtlety: now `#[cold]`, `#[no_mangle]`, & `#[track_caller]` do not get thrown away when malformed (i.e. have arguments). This doesn't matter too much (I think), because an error gets emitted either way, so the compilation will not finish.
2025-07-02 19:29:36 +02:00
Pavel Grigorenko
8bb7fdb236 NoArgsAttributeParser: use an assoc const instead 2025-07-02 00:21:12 +03:00
Guillaume Gomez
61bb076459
Rollup merge of #143240 - JonathanBrouwer:object_lifetime_default_parser, r=oli-obk
Port `#[rustc_object_lifetime_default]` to the new attribute parsing …

Ports rustc_object_lifetime_default to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

r? `@oli-obk`
cc `@jdonszelmann`
2025-07-01 17:47:04 +02:00
Jonathan Brouwer
1e474c2c6c
Port #[rustc_object_lifetime_default] to the new attribute parsing infrastructure 2025-07-01 16:31:23 +02:00
Jonathan Brouwer
d22ce4c5eb
Fix duplicate help on export_name and others
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-01 16:10:07 +02:00
Jonathan Brouwer
149bdde97e
Fix #[must_use = 1] not giving an error
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-01 16:10:05 +02:00