bors
e27f16a499
Auto merge of #143958 - samueltardieu:rollup-lh1s143, r=samueltardieu
...
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#142301 (tests: Fix duplicated-path-in-error fail with musl)
- rust-lang/rust#143630 (Drop `./x suggest`)
- rust-lang/rust#143736 (Give all bytes of TypeId provenance)
- rust-lang/rust#143752 (Don't panic if WASI_SDK_PATH not set when detecting compiler)
- rust-lang/rust#143837 (Adjust `run_make_support::symbols` helpers)
- rust-lang/rust#143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
- rust-lang/rust#143905 (Recover and suggest to use `;` to construct array type)
- rust-lang/rust#143907 (core: make `str::split_at_unchecked()` inline)
- rust-lang/rust#143910 (Add experimental `backtrace-trace-only` std feature)
- rust-lang/rust#143927 (Preserve constness in trait objects up to hir ty lowering)
- rust-lang/rust#143935 (rustc_type_ir/walk: move docstring to `TypeWalker` itself)
- rust-lang/rust#143938 (Update books)
- rust-lang/rust#143941 (update `cfg_select!` documentation)
Failed merges:
- rust-lang/rust#143926 (Remove deprecated fields in bootstrap)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-15 11:42:55 +00:00
Jonathan Brouwer
a14baf1e56
Define datastructures for #[cfg]
attribute, move StrippedCfgItem
2025-07-15 09:01:00 +02:00
Jonathan Brouwer
f0d0afab8e
Port #[pointee]
to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-14 23:16:31 +02:00
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
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
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
Jacob Pratt
3e76cd796f
Rollup merge of #143535 - reallesee:patch-1, r=jdonszelmann
...
Remove duplicate word
Deleted a duplicated word to improve text clarity.
contains contains - contains
2025-07-07 03:26:08 +02: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
Micke
8b65c2f85f
Remove duplicate word
2025-07-06 20:06:46 +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
Pavel Grigorenko
35453a854c
Add tidy-alphabetical for cross-crate attribute match
2025-07-03 21:36:28 +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
Jonathan Brouwer
1e474c2c6c
Port #[rustc_object_lifetime_default]
to the new attribute parsing infrastructure
2025-07-01 16:31:23 +02:00
bors
86e05cd300
Auto merge of #142921 - JonathanBrouwer:rustc_attributes_parser, r=oli-obk
...
Port `#[rustc_layout_scalar_valid_range_start/end]` to the new attrib…
Ports `rustc_layout_scalar_valid_range_start` and `rustc_layout_scalar_valid_range_end` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
r? `@jdonszelmann`
2025-07-01 08:33:00 +00:00
Anne Stijns
54cec0cf5a
Port #[link_section] to the new attribute parsing infrastructure
2025-06-29 16:23:46 +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
Jonathan Brouwer
f98ea3d144
Port #[rustc_layout_scalar_valid_range_start/end]
to the new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-27 09:08:21 +02:00
Jonathan Brouwer
9e35684072
Port #[used]
to new attribute parsing infrastructure
...
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-27 08:58:26 +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
64a1a98f47
encode_cross_crate for hir attributes
2025-06-25 22:10:40 +02:00
Jubilee
2ad6272649
Rollup merge of #142825 - jdonszelmann:track-caller, r=oli-obk
...
Port `#[track_caller]` to the new attribute system
r? ``@oli-obk``
depends on https://github.com/rust-lang/rust/pull/142493
Closes rust-lang/rust#142783
(didn't add a test for this, this situation should simply never come up again, the code was simply wrong. lmk if I should add it, but it won't test something very useful)
2025-06-24 19:45:32 -07:00
Jubilee
f542909d1c
Rollup merge of #138780 - trifectatechfoundation:loop_match_attr, r=oli-obk,traviscross
...
Add `#[loop_match]` for improved DFA codegen
tracking issue: https://github.com/rust-lang/rust/issues/132306
project goal: https://github.com/rust-lang/rust-project-goals/issues/258
This PR adds the `#[loop_match]` attribute, which aims to improve code generation for state machines. For some (very exciting) benchmarks, see https://github.com/rust-lang/rust-project-goals/issues/258#issuecomment-2732965199
Currently, a very restricted syntax pattern is accepted. We'd like to get feedback and merge this now before we go too far in a direction that others have concerns with.
## current state
We accept code that looks like this
```rust
#[loop_match]
loop {
state = 'blk: {
match state {
State::A => {
#[const_continue]
break 'blk State::B
}
State::B => { /* ... */ }
/* ... */
}
}
}
```
- a loop should have the same semantics with and without `#[loop_match]`: normal `continue` and `break` continue to work
- `#[const_continue]` is only allowed in loops annotated with `#[loop_match]`
- the loop body needs to have this particular shape (a single assignment to the match scrutinee, with the body a labelled block containing just a match)
## future work
- perform const evaluation on the `break` value
- support more state/scrutinee types
## maybe future work
- allow `continue 'label value` syntax, which `#[const_continue]` could then use.
- allow the match to be on an arbitrary expression (e.g. `State::Initial`)
- attempt to also optimize `break`/`continue` expressions that are not marked with `#[const_continue]`
r? ``@traviscross``
2025-06-24 19:45:30 -07: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
bjorn3
ba5556d239
Add #[loop_match]
for improved DFA codegen
...
Co-authored-by: Folkert de Vries <folkert@folkertdev.nl>
2025-06-23 20:43:04 +02:00