35436 Commits

Author SHA1 Message Date
Matthias Krüger
4d46c703ab
Rollup merge of #143767 - hkBst:cleanup-x, r=jieyouxu
Bump `src/tools/x` to Edition 2024 and some cleanups

- Some clippy fixes
- Bump `src/tools/x` to Edition 2024
2025-07-11 19:45:25 +02:00
Matthias Krüger
2d9d3df025
Rollup merge of #143716 - workingjubilee:document-some-codegen-backend-stuff, r=bjorn3,fee1-dead
compiler: doc/comment some codegen-for-functions interfaces

An out-of-date comment gets updated and some underdocumented functions get documented.
2025-07-11 19:45:24 +02:00
Matthias Krüger
4a25513995
Rollup merge of #143647 - ColtenOuO:master, r=ChrisDenton
Clarify and expand documentation for std::sys_common dependency structure

This PR makes a minor improvement to the module-level documentation of std::sys_common:

Replaces the lowercase “dag” with the more standard and explicit form “DAG (Directed Acyclic Graph)” for clarity.
2025-07-11 19:45:23 +02:00
Matthias Krüger
2f15436268
Rollup merge of #143633 - dillona:noinline-assert, r=fee1-dead
fix: correct assertion to check for 'noinline' attribute presence before removal
2025-07-11 19:45:23 +02:00
Matthias Krüger
51c23699d8
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
Shoyu Vanilla
f6e11e8248 Add a memory map bound check assertion on rendering const slice 2025-07-11 23:44:49 +09:00
Chayim Refael Friedman
4b29a9d6ea
Merge pull request #20219 from ChayimFriedman2/expr-store-mem
perf: Put the expression stuff in the expression store behind an `Option<Box>`
2025-07-11 14:25:39 +00:00
Shoyu Vanilla
4b2593085d fix: Normalize projection types before calculating memory maps 2025-07-11 23:10:03 +09:00
Shoyu Vanilla (Flint)
eaeee0be5a
Merge pull request #20224 from Hmikihiro/migrate_remove_dbg
Migrate `remove_dbg` assist to use `SyntaxEditor`
2025-07-11 07:41:34 +00:00
Hayashi Mikihiro
c79e24c1f1 Migrate remove_dbg assist to use SyntaxEditor 2025-07-11 16:24:57 +09:00
Matthias Krüger
ee0ad71148
Rollup merge of #143718 - scottmcm:ub-transmute-is-ub, r=WaffleLapkin
Make UB transmutes really UB in LLVM

Ralf suggested in <https://github.com/rust-lang/rust/pull/143410#discussion_r2184928123> that UB transmutes shouldn't be trapping, which happened for the one path *that* PR was changing, but there's another path as well, so *this* PR changes that other path to match.

r? codegen
2025-07-11 07:35:22 +02:00
Matthias Krüger
562dab675c
Rollup merge of #143708 - epage:pretty, r=compiler-errors
fix: Include frontmatter in -Zunpretty output

In the implementation (rust-lang/rust#140035), this was left as an open question for
the tracking issue (rust-lang/rust#136889).  My assumption is that this should be
carried over.

The test was carried over from rust-lang/rust#137193 which was superseded by rust-lang/rust#140035.

Thankfully, either way, `-Zunpretty` is unstable and we can always
change it even if we stabilize frontmatter.
2025-07-11 07:35:21 +02:00
Matthias Krüger
273d24e0a4
Rollup merge of #143661 - Muscraft:other-suggestion-message, r=estebank
chore: Improve how the other suggestions message gets rendered

Note: This change is part of my ongoing work to use `annotate-snippets` as `rustc`'s emitter

This change started as a way to remove some specialty code paths from `annotate-snippets`, by making the "and {} other candidates" message get rendered like a secondary message with no level, but turned into a fix for the message's Unicode output. Before this change, when using the Unicode output, the other suggestions message would get rendered outside of the main suggestion block, making it feel disconnected from what it was referring to. This change makes it so that the message is on the last line of the block, aligning its rendering with other secondary messages, and making it clear what the message is referring to.

Before:
```
error[E0433]: failed to resolve: use of undeclared type `IntoIter`
   ╭▸ $DIR/issue-82956.rs:28:24
   │
LL │         let mut iter = IntoIter::new(self);
   │                        ━━━━━━━━ use of undeclared type `IntoIter`
   ╰╴
help: consider importing one of these structs
   ╭╴
LL + use std::array::IntoIter;
   ├╴
LL + use std::collections::binary_heap::IntoIter;
   ├╴
LL + use std::collections::btree_map::IntoIter;
   ├╴
LL + use std::collections::btree_set::IntoIter;
   ╰╴
     and 9 other candidates
```

After:
```
error[E0433]: failed to resolve: use of undeclared type `IntoIter`
   ╭▸ $DIR/issue-82956.rs:28:24
   │
LL │         let mut iter = IntoIter::new(self);
   │                        ━━━━━━━━ use of undeclared type `IntoIter`
   ╰╴
help: consider importing one of these structs
   ╭╴
LL + use std::array::IntoIter;
   ├╴
LL + use std::collections::binary_heap::IntoIter;
   ├╴
LL + use std::collections::btree_map::IntoIter;
   ├╴
LL + use std::collections::btree_set::IntoIter;
   │
   ╰ and 9 other candidates
```
2025-07-11 07:35:20 +02:00
Matthias Krüger
3b38f25bc3
Rollup merge of #143611 - GrigorenkoPV:ParseIntError, r=tgross35
Mention more APIs in `ParseIntError` docs

Fixes rust-lang/rust#143602

r? `@lolbinarycat`

`@rustbot` label +A-docs
2025-07-11 07:35:20 +02:00
Matthias Krüger
a38083c896
Rollup merge of #143568 - Ayush1325:uefi-tcp4-timeout, r=tgross35
std: sys: net: uefi: tcp4: Add timeout support

- Implement timeout support for read, write and connect.
- A software implementation using Instant.
2025-07-11 07:35:19 +02:00
Matthias Krüger
ba2001fabd
Rollup merge of #143303 - Kivooeo:tf28, r=tgross35
`tests/ui`: A New Order [28/28] FINAL PART

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? ``@tgross35``
2025-07-11 07:35:19 +02:00
Matthias Krüger
337a3018d1
Rollup merge of #143302 - Kivooeo:tf27, r=tgross35
`tests/ui`: A New Order [27/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? ``@tgross35``
2025-07-11 07:35:18 +02:00
Matthias Krüger
05b19877bf
Rollup merge of #142391 - LevitatingBusinessMan:setsid, r=workingjubilee
rust: library: Add `setsid` method to `CommandExt` trait

Add a setsid method to the CommandExt trait so that callers can create a process in a new session and process group whilst still using the POSIX spawn fast path.

Tracking issue: rust-lang/rust#105376

ACP: https://github.com/rust-lang/libs-team/issues/184

This PR was previously submitted by ``@HarveyHunt`` (whom I marked as Co-Author in the commit message) in rust-lang/rust#105377. However that PR went stale.

I applied the [suggestion](231d19fcbf (r1893457943)) to change the function signature to `fn setsid(&mut self, setsid: bool) -> &mut Command`.
2025-07-11 07:35:17 +02:00
bors
f934bcf4f6 Auto merge of #142911 - mejrs:unsized, r=compiler-errors
Remove support for dynamic allocas

Followup to rust-lang/rust#141811
2025-07-11 05:27:32 +00:00
Shoyu Vanilla (Flint)
c51a2dd600
Merge pull request #20230 from asahi-myzk/update-cargo-metadata
update cargo_metadata to 0.21.0
2025-07-11 01:42:57 +00:00
asahi-myzk
2f7dba4977 update cargo_metadata to 0.21.0 2025-07-11 09:59:40 +09:00
Chayim Refael Friedman
e2c8cefa63
Merge pull request #20228 from ChayimFriedman2/fix-use-display
fix: Fix display of `use<>` syntax
2025-07-10 21:19:38 +00:00
Chayim Refael Friedman
1d3ca1d6f3 Fix display of use<> syntax 2025-07-11 00:08:24 +03:00
bors
06a4210458 Auto merge of #143525 - Shourya742:2025-07-06-add-profiler, r=Kobzol
Add profiler to bootstrap command

This PR adds command profiling to the bootstrap command. It tracks the total execution time and records cache hits for each command. It also provides the ability to export execution result to a JSON file. Integrating this with Chrome tracing could further enhance observability.

r? `@Kobzol`
2025-07-10 16:51:58 +00:00
bors
622a598ac1 Auto merge of #143731 - matthiaskrgr:rollup-lm9q7vc, r=matthiaskrgr
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#136906 (Add checking for unnecessary delims in closure body)
 - rust-lang/rust#143652 (docs: document trait upcasting rules in `Unsize` trait)
 - rust-lang/rust#143657 (Resolver: refact macro map into external and local maps)
 - rust-lang/rust#143659 (Use "Innermost" & "Outermost" terminology for `AttributeOrder`)
 - rust-lang/rust#143663 (fix: correct typo in attr_parsing_previously_accepted message key)
 - rust-lang/rust#143666 (Re-expose nested bodies in rustc_borrowck::consumers)
 - rust-lang/rust#143668 (Fix VxWorks build errors)
 - rust-lang/rust#143670 (Add a new maintainer to the wasm32-wasip1 target)
 - rust-lang/rust#143675 (improve lint doc text)
 - rust-lang/rust#143683 (Assorted `run-make-support` maintenance)
 - rust-lang/rust#143695 (Auto-add `S-waiting-on-author` when the PR is/switches to draft state)
 - rust-lang/rust#143706 (triagebot.toml: ping lolbinarycat if tidy extra checks were modified)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-10 13:49:36 +00:00
Matthias Krüger
caabaa9d4a
Rollup merge of #143706 - lolbinarycat:triagebot-extra-checks-ping, r=Kobzol
triagebot.toml: ping lolbinarycat if tidy extra checks were modified

I rewrote a large chunk of this module, and plan to do further changes to it (namely moving rustdoc_js checks into it), so it would be nice to keep up with and provide feedback on any changes to it, at least for the immediate future.

r? `@Kobzol`
2025-07-10 15:19:36 +02:00
Matthias Krüger
4e15daadee
Rollup merge of #143695 - Urgau:waiting-on-author-new_draft, r=Kobzol
Auto-add `S-waiting-on-author` when the PR is/switches to draft state

This PR adds the `S-waiting-on-author` as a `new_draft` when the PR is/switches to draft state.

Related to https://github.com/rust-lang/triagebot/issues/2102 & https://github.com/rust-lang/triagebot/pull/2104

cc `@jieyouxu`
r? `@Kobzol`
2025-07-10 15:19:35 +02:00
Matthias Krüger
1ae2375a49
Rollup merge of #143683 - jieyouxu:rms-cleanup, r=Kobzol
Assorted `run-make-support` maintenance

This PR should contain no functional changes.

- Commit 1: Removes the support library's CHANGELOG. In the very beginning, I thought maybe we would try to version this library. But this is a purely internal test support library, and it's just extra busywork trying to maintain changelog/versions. It's also hopelessly outdated.
- Commit 2: Resets version number to `0.0.0`. Ditto on busywork.
- Commit 3: Bump `run-make-support` to Edition 2024. The support library was already "compliant" with Edition 2024.
- Commit 4: Slightly organizes the support library dependencies.
- Commit 5: Previously, I tried hopelessly to maintain some manual formatting, but that was annoying because it required skipping rustfmt (so export ordering etc. could not be extra formatted). Give up, and do some rearrangements / module prefix tricks to get the `lib.rs` looking at least *reasonable*. IMO this is not a strict improvement, but I rather regain the ability to auto-format it with rustfmt.
- Commit {6,7}: Noticed in rust-lang/rust#143669 that we apparently had *both* {`is_msvc`, `is_windows_msvc`}. This PR removes `is_msvc` in favor of `is_windows_msvc` to make it unambiguous (and only retain one way of gating) as there are some UEFI targets which are MSVC but not Windows.

Best reviewed commit-by-commit.

r? `@Kobzol`
2025-07-10 15:19:35 +02:00
Matthias Krüger
291a97b508
Rollup merge of #143675 - hkBst:overflowing-1, r=oli-obk
improve lint doc text
2025-07-10 15:19:34 +02:00
Matthias Krüger
9ad71e7934
Rollup merge of #143670 - loganek:loganek/wasm32-wasip1-new-maintainer, r=alexcrichton
Add a new maintainer to the wasm32-wasip1 target

cc: `@alexcrichton`
2025-07-10 15:19:34 +02:00
Matthias Krüger
8672a28c8a
Rollup merge of #143668 - biabbas:vxworks, r=Noratrieb
Fix VxWorks build errors

fixes rust-lang/rust#143442

r? ``@Noratrieb``
2025-07-10 15:19:33 +02:00
Matthias Krüger
f618825f3c
Rollup merge of #143666 - nilehmann:nested_bodies_in_consumers, r=lcnr
Re-expose nested bodies in rustc_borrowck::consumers

After https://github.com/rust-lang/rust/pull/138499, it's not possible anymore to get borrowck information for nested bodies via `get_body_with_borrowck_facts`. This PR re-exposes nested bodies by returning a map containing the typeck root and all its nested bodies. To collect the bodies, a map is added to `BorrowCheckRootCtxt`, and a body is inserted every time `do_mir_borrowck` is called.

r? ``@lcnr``
2025-07-10 15:19:32 +02:00
Matthias Krüger
64282ebc90
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
Matthias Krüger
51b7c257e8
Rollup merge of #143659 - GrigorenkoPV:attributes/inner-outer, r=jdonszelmann
Use "Innermost" & "Outermost" terminology for `AttributeOrder`

Follow-up to rust-lang/rust#143603.

https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/attribute.20parsing.20rework/near/527768926

Also remove some outdated comments. cc `@jdonszelmann`
2025-07-10 15:19:31 +02:00
Matthias Krüger
22205b60f3
Rollup merge of #143657 - LorrensP-2158466:split-macro-map, r=petrochenkov
Resolver: refact macro map into external and local maps

Puts `MacroData` inside of the `ResolverArena` and splits `macro_map` into 2 maps: `local_macro_map` and `external_macro_map`. This way `get_macro_by_def_id` can take a `&Resolver` instead of a mutable one.

Part of [#gsoc > Project: Parallel Macro Expansion](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/with/516965603)

r? `@petrochenkov`
2025-07-10 15:19:31 +02:00
Matthias Krüger
28f4ae318a
Rollup merge of #143652 - moulins:doc-unsize-trait-upcasting, r=compiler-errors
docs: document trait upcasting rules in `Unsize` trait

The trait upcasting feature stabilized in 1.86 added new `Unsize` implementation, but this wasn't reflected in the trait's documentation.
2025-07-10 15:19:30 +02:00
Matthias Krüger
b86999e93e
Rollup merge of #136906 - chenyukang:yukang-fix-136741-closure-body, r=oli-obk
Add checking for unnecessary delims in closure body

Fixes #136741
2025-07-10 15:19:29 +02:00
Shoyu Vanilla (Flint)
600f573256
Merge pull request #20054 from Young-Flash/folding_all
feat: support folding multiline arg list & fn body in one folding range
2025-07-10 12:05:31 +00:00
Shoyu Vanilla (Flint)
cce300bb17
Merge pull request #20223 from Hmikihiro/migrate_generate_impl
Migrate `generate_impl` assist to use `SyntaxEditor`
2025-07-10 11:45:25 +00:00
Hayashi Mikihiro
c3a5a8c22a Migrate generate_impl assist to use SyntaxEditor 2025-07-10 18:12:16 +09:00
Shoyu Vanilla (Flint)
e9968fc555
Merge pull request #20210 from ChayimFriedman2/naked-asm-safe
fix: Inline asm fixes
2025-07-10 06:28:49 +00:00
yukang
c37949c628 remove unnecessary parens in rust-analyzer 2025-07-10 13:50:02 +08:00
Laurențiu Nicola
69c8a6892a
Merge pull request #20221 from lnicola/assist-let-chain
minor: Revert "remove `if-let` chains"
2025-07-10 05:37:26 +00:00
Laurențiu Nicola
8789098dbc Revert "remove if-let chains"
This reverts commit fcc81a38b3ed55447735f71e8d374fcb36c22f24.
2025-07-10 08:24:53 +03:00
Shoyu Vanilla (Flint)
eede8f1f4e
Merge pull request #20212 from ChayimFriedman2/dyn-hint
fix: Fixes for `dyn` inlay hint
2025-07-10 04:57:57 +00:00
Shoyu Vanilla (Flint)
df1c3e03df
Merge pull request #20218 from Hmikihiro/migrate_convert_match_to_let_else
Migrate `convert_match_to_let_else` assist to use `SyntaxEditor`
2025-07-10 04:32:40 +00:00
Hayashi Mikihiro
be609a57bf Migrate convert_match_to_let_else assist to use SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-10 11:22:32 +09:00
Chayim Refael Friedman
ad708fdbd1 Put the expression stuff in the expression store behind an Option<Box>
And leave only the type stuff without it.

This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory.

This saves 58mb on `analysis-stats .`.
2025-07-10 05:18:43 +03:00
bors
816b4a6b52 Auto merge of #143405 - tgross35:update-builtins, r=tgross35
Update the `compiler-builtins` subtree

Update the Josh subtree to https://github.com/rust-lang/compiler-builtins/commit/8aba4c899ee8.

r? `@ghost`
2025-07-09 22:42:11 +00:00
Ed Page
f4d9018a48 feat(lexer): Allow including frontmatter with 'tokenize' 2025-07-09 16:42:27 -05:00