Skip to content

Rollup of 13 pull requests#157261

Closed
JonathanBrouwer wants to merge 239 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-dyAcfg6
Closed

Rollup of 13 pull requests#157261
JonathanBrouwer wants to merge 239 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-dyAcfg6

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

ChayimFriedman2 and others added 30 commits April 27, 2026 03:56
Example
---
```rust
fn foo() {
    let foo = Ok(1);
    return foo.unwrap_$0or(2);
}
```

**Before this PR**

```rust
fn foo() {
    let foo = Ok(1);
    return foo.unwrap_or_else(|| 2);
}
```

**After this PR**

```rust
fn foo() {
    let foo = Ok(1);
    return foo.unwrap_or_else(|e| 2);
}
```
The most important reason is incrementality. While not a lot of things depend on the stability of `EnumVariantId`, it's still useful to have them stable.

However it turns out that many things actually do want the name, more than those that want the index.
`ThinVec` doesn't allocate when empty.
Previously module ID reuse was based on order of creation solely. Now we store the parent module and name, and so Salsa will reuse the ID for modules that have the same name and parent.

This is important as many interned IDs contain modules, so if the module is invalidated they too are.
Example
---
```rust
struct Foo(&'static str);

impl Foo {
    fn text(&self) -> &str { self.0 }
}

fn main() {
    let s = Foo("");
    $0print!("{}{}", s, s);$0
    let _ = s.text() == "";
}
```

**Before this PR**

```rust
fn $0fun_name(s: &Foo) {
    *print!("{}{}", s, s);
}
```

**After this PR**

```rust
fn $0fun_name(s: &Foo) {
    print!("{}{}", *s, *s);
}
```

---

```rust
macro_rules! refmut { ($e:expr) => { &mut $e }; }
fn foo() {
    let mut n = 1;
    $0let v = refmut!(n);
    *v += 1;$0
    let k = n;
}
```

**Before this PR**

```rust
fn $0fun_name(n: &mut i32) {
    let v = refmut!(n);
    *v += 1;
}
```

**After this PR**

```rust
fn $0fun_name(n: &mut i32) {
    let v = refmut!(*n);
    *v += 1;
}
```
minor: Replace `cfg-if` with `std::cfg_select`
…ge-pat-e0029

feat: add diagnostic for E0029
Encode the name instead of index in `EnumVariantId`
…-exhaustive-record-pat

feat: add diagnostic for E0638
Signed-off-by: Kai Tanaka <275430420+quyentonndbs@users.noreply.github.com>
…ords-in-stdx-and-ide-comments

fix: duplicated words in stdx/assert.rs and ide/inject.rs doc-comments
  `request.rs` was passing `binary_target = true` for
  TargetKind::Bin, Example, and Test, but not for Bench, so a
  `fn main()` in `benches/foo.rs` (typical with
  `harness = false`) was suppressed by `should_skip_runnable`
  in the annotations layer.  Mirror `target_spec.rs:255` by
  including Bench in both the code-lens config check and
  `should_skip_target`.

  Closes rust-lang/rust-analyzer#21948.

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
perf: Provide access to `RootDatabase`'s `LineIndex` for the proc macro protocol
fix: show Run lens for fn main in bench targets
Show `const` in the signature help if applicable
…se_path_seg

Fix assit `qualify_path` loses path segment
fix: handle usages in macro for extract_function
…dows-clone, r=Mark-Simulacrum

Don't drop uninit memory when `MapWindows::clone` panics

Fixes rust-lang#156501, using the approach suggested in @bjorn3's comment rust-lang#156517 (comment)
…ts, r=jdonszelmann

Add `#[unsafe_eii]` to unsafe EII UI tests

Tracking issue: rust-lang#125418

Add UI test coverage for unsafe implementations of declarations created with `#[unsafe_eii]`.
…mann

Use #[panic_handler] rather than #[lang = "panic_impl"]

As preparation for turning #[panic_handler] from a weak lang item into an EII.

r? @jdonszelmann
…=folkertdev

Add Xtensa va_arg assembly coverage

Add Xtensa va_arg assembly coverage, see rust-lang#156568
…dianqk

cg_ssa: a bit less `immediate_or_packed_pair`

This is one of the things that made cg_clif not use cg_ssa, IIRC, so let's take the opportunities to avoid it where we can.

r? codegen
…ation-fix, r=petrochenkov

Trace `?id.local_def_index` instead of `id` in `def_path_hash`

Trace `local_def_index` instead of `LocalDefId` in `def_path_hash`, as latter causes errors (previous version of this function accepted `DefIndex`).

Fixes rust-lang#157238.
r? @petrochenkov
…ges, r=Urgau

Tune backport Zulip messages

Asked in triagebot#2407

In the zulip message that opens a backport poll, adds a suggestion about the correct triagebot syntax to approve/decline a backport to avoid ambiguity and typos

Thanks for a review

r? @Urgau
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 1, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Jun 1, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 1, 2026

📌 Commit 4e9294e 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 Jun 1, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 1, 2026

⌛ Trying commit 4e9294e with merge 0223204

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/26766433909

rust-bors Bot pushed a commit that referenced this pull request Jun 1, 2026
Rollup of 13 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-21-3 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [assembly] tests/assembly-llvm/c-variadic/mips.rs#MIPS ... ok
test [assembly] tests/assembly-llvm/asm/x86-types.rs#i686 ... ok
test [assembly] tests/assembly-llvm/c-variadic/mips.rs#MIPS64 ... ok
test [assembly] tests/assembly-llvm/asm/x86-types.rs#x86_64 ... ok
test [assembly] tests/assembly-llvm/c-variadic/xtensa.rs#XTENSA ... ignored, ignored when the LLVM version 21.1.2 is older than 22.0.0
test [assembly] tests/assembly-llvm/c-variadic/sparc.rs#SPARC ... ok
test [assembly] tests/assembly-llvm/closure-inherit-target-feature.rs ... ok
test [assembly] tests/assembly-llvm/c-variadic/mips.rs#MIPS64EL ... ok
test [assembly] tests/assembly-llvm/compiletest-self-test/use-minicore-no-run.rs ... ok
test [assembly] tests/assembly-llvm/cstring-merging.rs ... ok
---
[RUSTC-TIMING] ide_completion test:true 39.202
[RUSTC-TIMING] vfs_notify test:true 0.221
error: cannot satisfy dependencies so `std` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = note: `rustc_driver` was unavailable as a static crate, preventing fully static linking
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `compiler_builtins` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `libc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_std_workspace_core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `miniz_oxide` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `adler2` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `hashbrown` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_std_workspace_alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `std_detect` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `rustc_demangle` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `cfg_if` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `addr2line` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `gimli` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `object` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `memchr` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

error: cannot satisfy dependencies so `panic_unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
  = help: `feature(rustc_private)` is needed to link to the compiler's `rustc_driver` library

[RUSTC-TIMING] proc_macro_api test:true 1.383
error: could not compile `proc-macro-api` (lib test) due to 19 previous errors
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] hello_world test:true 4.787

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 1, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 1, 2026

PR #157251, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 1, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 1, 2026

Try build cancelled. Cancelled workflows:

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself rollup A PR which is a rollup 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.