Skip to content

Rollup of 8 pull requests - #164979

Merged
rust-bors[bot] merged 51 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9YogL6i
Oct 26, 2026
Merged

rust-bors[bot] merged 51 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9YogL6i

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

A4-Tacks and others added 30 commits August 26, 2026 00:54
Example
---
```rust
macro_rules! identity { ($($t:tt)*) => { $($t)* }; }
struct Foo;
impl Foo {
    fn foo(self, r1: u32, r2: u32, (complex,): (u32,)) {
        identity! {
            let _ = self;
            let _ = r1;
            let _ = (r2, r2);
            let _ = complex;
        }
    }
}
fn bar() {
    Foo.$0foo(1, 2, (3,));
}
```

**Before this PR**

request handler panicked: TextRange -offset overflowed

**After this PR**

```rust
fn bar() {
    {
        let this = Foo;
        let r1 = 1;
        let r2 = 2;
        let (complex,) = (3,);
        identity! {
            let _ = this;
            let _ = r1;
            let _ = (r2, r2);
            let _ = complex;
        }
    };
}
```
- And fix method call name-match

Example
---
```rust
struct S { info: u32 }
impl S {
    fn info(&self) -> u32 { self.info }
    fn foo(&self) {
        needs(i$0);
    }
}
fn needs(info: &mut u32) {}
```

**Before this PR**

```text
fd self.info u32 [name]
lc self &S [local]
st S S []
sp Self S []
fn needs(…) fn(&mut u32) []
me self.foo() fn(&self) []
me self.info() fn(&self) -> u32 []
```

**After this PR**

```text
fd self.info u32 [name]
fd &mut self.info [type+name]
me self.info() fn(&self) -> u32 [name]
me &mut self.info() [type+name]
lc self &S [local]
st S S []
sp Self S []
fn needs(…) fn(&mut u32) []
me self.foo() fn(&self) []
```
Example
---
```rust
//- /lib.rs
mod sub {
    mod $0
}
//- /sub/lib.rs
//- /sub/main.rs
```

**Before this PR**

Cannot complete any modules

**After this PR**

```rust
md lib;
md main;
```
This is convenient for jumping out and makes it work on some clients that do not support multi-`$0` tabstop

Example
---
**Before this PR**

```rust
snippet(ctx, cap, "pd", "eprintln!(\"$0 = {:?}\", $0);")
```

**After this PR**

```rust
snippet(ctx, cap, "pd", "eprintln!(\"$1 = {:?}\", $1);")
```
minor: 'pd' snippet use `$1` instead of multi `$0`
Example
---
```rust
fn () {}
```

```diff
 SOURCE_FILE
   FN
     FN_KW "fn"
     WHITESPACE " "
-    ERROR
+    PARAM_LIST
       L_PAREN "("
-    ERROR
       R_PAREN ")"
     WHITESPACE " "
     BLOCK_EXPR
       STMT_LIST
         L_CURLY "{"
         R_CURLY "}"
   WHITESPACE "\n"
-error 3: expected a name
-error 4: expected function arguments
-error 4: expected a curly brace
+error 2: expected a name
```
Example
---
```rust
const _=x::()
```

```diff
 CONST
   CONST_KW "const"
   WHITESPACE " "
   UNDERSCORE "_"
   EQ "="
   PATH_EXPR
     PATH
       PATH
         PATH_SEGMENT
           NAME_REF
             IDENT "x"
       COLON2 "::"
-      PATH_SEGMENT
-        ERROR
-          L_PAREN "("
-ERROR
-  R_PAREN ")"
+      ARG_LIST
+        L_PAREN "("
+        R_PAREN ")"
```
Use `publish = false` for the `toolchain` crate
…-inference

fix: emit E0029 for range patterns with inferred invalid types
About macro hygiene, avoid error when user defined a `format_args!` in scope
…acro

fix: do not panic when inline call param usages in macro
`LeafRegionConstraint`, `Or`, `And`, and `RegionConstraint` defaulted
their span parameter to `()`, which reads as an empty tuple rather than
as "this constraint has no span".

Add a `NoSpan` unit struct and use it as the default, and add a
`ConstraintSpan` trait implemented for `NoSpan` and `rustc_span::Span`.
This replaces the repeated `Clone + Debug + Eq + Hash` bounds on the
constructors and span conversion helpers.

No behavior change.
…pace

The rustc-dev component ships the compiler sources with
`rustc-src/rust/compiler/rustc/Cargo.toml` as the entry manifest, but
without the workspace root manifest next to the lockfile at
`rustc-src/rust/Cargo.lock`. FetchMetadata only looked for a lockfile
right next to the manifest, so the rustc workspace's metadata fetch always
ran with `--locked` and no lockfile. cargo then fails, and rust-analyzer
silently degrades to `--no-deps` metadata, dropping rustc_middle and
friends from the crate graph entirely.

For the rustc workspace only, copy the lockfile from the root of the rust
source tree instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…estors

Search manifest ancestors for the lockfile when fetching cargo metadata
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
minor: add '(' to item recover, improve fn missing name
RalfJung and others added 9 commits October 26, 2026 09:48
…ndles-len, r=joboet

Use the updated buffer length in UEFI locate_handles

locate_handles was using the handle count from the first LocateHandle call when setting the
vec length, instead of the size the second call actually wrote. If handles go away between
the two calls this marks uninitialized entries as initialized. Use the updated buf_len instead.

Fixes rust-lang#164945
…n-spawn-failure, r=joboet

uefi: roll back env changes when `start_image` fails

Fixes rust-lang#164949

On UEFI, `process::output` applies the child's environment changes to the process-global UEFI environment and rolls them back after `start_image`. If `start_image` returned an error, the `?` returned early before the rollback ran, so the child's variables (notably `path`, which later `resolve_program` lookups depend on) leaked permanently into the parent.

This keeps the `start_image` result, restores the environment unconditionally, and only then propagates the error.

Tested with `./x check library --target x86_64-unknown-uefi`, `./x fmt --check` and `./x test tidy`. I have not run it on UEFI hardware or under QEMU.

cc @dvdhrm @nicholasbishop (UEFI target maintainers)
…ts, r=joboet

thread_local::guard: update comments a bit

The `thread_current_in_dtor` test recently failed in Miri so I had to dig into this.

- Mention at the top that this file is also responsible for calling `rt::thread_cleanup`.
- The comments used to skip some reasoning steps, probably taking them for granted. Add a bit  more detail to make them easier to follow.

r? @joboet
…-sub, r=lcnr

Remove the 'sub' method from 'At' and migrate to 'sub_raw'

Continuation of rust-lang#163978, similar scope to rust-lang#164244.
…yperia

Use a NoSpan marker for region constraints without spans

`LeafRegionConstraint`, `Or`, `And`, and `RegionConstraint` defaulted their span parameter to `()`, which reads as an empty tuple rather than as "this constraint has no span".

Add a `NoSpan` unit struct and use it as the default, and add a `ConstraintSpan` trait implemented for `NoSpan` and `rustc_span::Span`. This replaces the repeated `Clone + Debug + Eq + Hash` bounds on the constructors and span conversion helpers.
…ds, r=hanna-kruppe

Remove redundant vec and duplicate indexing in find_noop_landing_pads

The original code looks like some refactoring artifact. The `map().collect()` chain is redundant because the `vec` is immediately turned into iterator again, and it throws away the `BasicBlockData` reference just to look it up again in the main loop.
…us-easy, r=Kivooeo

Reduce `SpanData` use

`SpanData` is mostly an internal detail, and using `Span` is preferable where possible. Details in individual commits.

r? @Kivooeo
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@6ee6a51.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 26, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 26, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4923cbc has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 26, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 26, 2026
@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 2h 56m 25s
Pushing 846e51f to main...

@rust-bors
rust-bors Bot merged commit 846e51f into rust-lang:main Oct 26, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 019b59d (parent) -> 846e51f (this PR)

Test differences

Show 31 test diffs

Stage 0

  • completions::mod_::tests::contained_submodule_name_same_as_root: [missing] -> pass (J0)
  • completions::mod_::tests::exclude_crate_roots: [missing] -> pass (J0)
  • completions::mod_::tests::inside_name_same_as_root: [missing] -> pass (J0)
  • handlers::invalid_range_pat_type::tests::inferred_invalid_type_range_patterns: [missing] -> pass (J0)
  • handlers::invalid_range_pat_type::tests::inferred_valid_type_range_patterns: [missing] -> pass (J0)
  • tempfile::tests::named_temp_file_new_from_existing_copies_file: [missing] -> pass (J0)
  • test_push_semantic_diagnostics: [missing] -> pass (J0)
  • tests::runner::err::function_missing_name: [missing] -> pass (J0)

Stage 1

  • completions::mod_::tests::contained_submodule_name_same_as_root: [missing] -> pass (J1)
  • completions::mod_::tests::exclude_crate_roots: [missing] -> pass (J1)
  • completions::mod_::tests::inside_name_same_as_root: [missing] -> pass (J1)
  • handlers::invalid_range_pat_type::tests::inferred_invalid_type_range_patterns: [missing] -> pass (J1)
  • handlers::invalid_range_pat_type::tests::inferred_valid_type_range_patterns: [missing] -> pass (J1)
  • tempfile::tests::named_temp_file_new_from_existing_copies_file: [missing] -> pass (J1)
  • test_push_semantic_diagnostics: [missing] -> pass (J1)
  • tests::runner::err::function_missing_name: [missing] -> pass (J1)
  • tempfile::tests::named_temp_file_allows_read_only_sharing: [missing] -> pass (J2)

Additionally, 14 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 846e51f66b1e7b49ba9e3988c58ccfe5817ce0a9 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-x86_64-msvc-1: 1h 40m -> 2h 47m (+66.7%)
  2. dist-i686-linux: 1h 9m -> 1h 52m (+63.1%)
  3. test-x86_64-gnu-distcheck: 1h 32m -> 2h 29m (+62.0%)
  4. dist-x86_64-freebsd: 1h 2m -> 1h 33m (+50.2%)
  5. test-armhf-gnu: 57m 15s -> 1h 25m (+50.1%)
  6. test-x86_64-rust-for-linux: 1h 1m -> 33m 5s (-46.3%)
  7. dist-powerpc64-linux-gnu: 1h 7m -> 1h 38m (+46.2%)
  8. test-x86_64-msvc-ext1: 2h 31m -> 1h 26m (-43.1%)
  9. test-arm-android: 1h 16m -> 1h 45m (+38.2%)
  10. test-x86_64-gnu-parallel-frontend: 2h 1m -> 1h 15m (-38.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (846e51f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.4%, secondary 1.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.1% [0.6%, 1.5%] 2
Regressions ❌
(secondary)
1.5% [0.6%, 2.2%] 3
Improvements ✅
(primary)
-0.9% [-2.1%, -0.5%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-2.1%, 1.5%] 7

Cycles

Results (primary -0.4%, secondary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.8% [0.5%, 1.6%] 6
Regressions ❌
(secondary)
3.5% [0.5%, 8.2%] 4
Improvements ✅
(primary)
-1.1% [-2.3%, -0.6%] 10
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) -0.4% [-2.3%, 1.6%] 16

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.601s -> 489.496s (-0.02%)
Artifact size: 405.81 MiB -> 405.84 MiB (0.01%)

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#164955 Use the updated buffer length in UEFI locate_handles 50a8fee5656552f959587665baf5903c1fb6fcc8
(link)
#164958 uefi: roll back env changes when start_image fails 815e5b603638350a5541c93ca594c892acfe05b3
(link)
#164968 thread_local::guard: update comments a bit 3f9b8ef996b41ae2332d4530cc7601df31ef2a1b
(link)
#164303 Remove the 'sub' method from 'At' and migrate to 'sub_raw' 7be6ca4f2e9d756cdc157a580b49d7ab7744c239
(link)
#164674 Use a NoSpan marker for region constraints without spans d3baa0410ab2d5004c3240d7b38ccd1aee4dd92b
(link)
#164934 Remove redundant vec and duplicate indexing in find_noop_la… 313bd4e783908feb573436135ea039031a4beedb
(link)
#164954 Reduce SpanData use e26b0ab7058012011e260098d6b8fda0dbb149ed
(link)
#164970 rust-analyzer subtree update 091ca382c78044803fb4afd2f55289f329800674
(link)

parent commit: 019b59d810

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.