Rollup of 13 pull requests#157261
Closed
JonathanBrouwer wants to merge 239 commits into
Closed
Conversation
…tocol Instead of recreating it.
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);
}
```
minor: sync from downstream
…yumu Less conjuration magic
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)
…nkov Privacy: small cleanups r? @petrochenkov
…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
Contributor
Author
Contributor
Contributor
|
⌛ Trying commit 4e9294e with merge 0223204… To cancel the try build, run the command 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
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
PR #157251, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
Contributor
Author
|
@bors try cancel |
Contributor
|
Try build cancelled. Cancelled workflows: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
rust-analyzersubtree update #157251 (rust-analyzersubtree update)MapWindows::clonepanics #156588 (Don't drop uninit memory whenMapWindows::clonepanics)#[unsafe_eii]to unsafe EII UI tests #156817 (Add#[unsafe_eii]to unsafe EII UI tests)immediate_or_packed_pair#157220 (cg_ssa: a bit lessimmediate_or_packed_pair)?id.local_def_indexinstead ofidindef_path_hash#157241 (Trace?id.local_def_indexinstead ofidindef_path_hash)r? @ghost
Create a similar rollup