Skip to content

rust-analyzer subtree update#157251

Merged
rust-bors[bot] merged 203 commits into
rust-lang:mainfrom
lnicola:sync-from-ra
Jun 7, 2026
Merged

rust-analyzer subtree update#157251
rust-bors[bot] merged 203 commits into
rust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola
Copy link
Copy Markdown
Member

@lnicola lnicola commented Jun 1, 2026

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
Previously, adding newline between statements was often redundant

Example
---
```rust
fn main() {
    let bar = Some(true);
    bar.$0
    other();
}
```

**Before this PR**

```rust
fn main() {
    let bar = Some(true);
    let Some(${1:bar}) = bar else {
        $2
    };
    $0
    other();
}
```

**After this PR**

```rust
fn main() {
    let bar = Some(true);
    let Some(${1:bar}) = bar else {
        $2
    };$0
    other();
}
```
@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented Jun 6, 2026

I believe the above commit will fix CI.

@rust-log-analyzer

This comment has been minimized.

@lnicola
Copy link
Copy Markdown
Member Author

lnicola commented Jun 6, 2026

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

☀️ Try build successful (CI)
Build commit: 718633f (718633f0fa276e8cc3558004f70755977e76c87a, parent: 8954863c81df429ebf96ea38a16c76f209995833)

@lnicola
Copy link
Copy Markdown
Member Author

lnicola commented Jun 6, 2026

@bors r+ p=1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

📌 Commit e1ccd27 has been approved by lnicola

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@123c166.

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

r? @ghost
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 7, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@123c166.

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

r? @ghost
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 7, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@123c166.

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

r? @ghost
rust-bors Bot pushed a commit that referenced this pull request Jun 7, 2026
Rollup of 25 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #156573 (Add unwinder_private_data_size for wasm64 target)
 - #156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - #156840 (Stabilize `PathBuf::into_string`)
 - #156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157380 (clarify compiler_fence (and fence) docs)
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)
 - #157531 (ci: bump x86_64-gnu base image to 26.04)
 - #157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
@rust-bors rust-bors Bot merged commit beffb97 into rust-lang:main Jun 7, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 7, 2026
rust-timer added a commit that referenced this pull request Jun 7, 2026
Rollup merge of #157251 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@123c166.

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

r? @ghost
@lnicola lnicola deleted the sync-from-ra branch June 7, 2026 10:49
@lnicola
Copy link
Copy Markdown
Member Author

lnicola commented Jun 7, 2026

Thanks, @bjorn3, I owe you one!

@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented Jun 7, 2026

I broke it. It is only fair that I fix it again.

pull Bot pushed a commit to asukaminato0721/rust-analyzer that referenced this pull request Jun 7, 2026
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#157251 (`rust-analyzer` subtree update)
 - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#154742 (Add APIs for case folding to the standard library)
 - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - rust-lang/rust#157016 (add `extern "tail"` calling convention)
 - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve)
 - rust-lang/rust#157483 (fix windows-gnu TLS leak)
 - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - rust-lang/rust#156136 (Move tests box)
 - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target)
 - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`)
 - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs)
 - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct)
 - rust-lang/rust#157526 (std tests: skip a slow test on Miri)
 - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04)
 - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jun 8, 2026
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#157251 (`rust-analyzer` subtree update)
 - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#154742 (Add APIs for case folding to the standard library)
 - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - rust-lang/rust#157016 (add `extern "tail"` calling convention)
 - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve)
 - rust-lang/rust#157483 (fix windows-gnu TLS leak)
 - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - rust-lang/rust#156136 (Move tests box)
 - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target)
 - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`)
 - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs)
 - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct)
 - rust-lang/rust#157526 (std tests: skip a slow test on Miri)
 - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04)
 - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.