Skip to content

Subtree update of rust-analyzer #144114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 77 commits into from
Jul 18, 2025
Merged

Subtree update of rust-analyzer #144114

merged 77 commits into from
Jul 18, 2025

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Jul 18, 2025

r? @ghost

A4-Tacks and others added 30 commits June 5, 2025 12:14
Signed-off-by: Hayashi Mikihiro <[email protected]>
Signed-off-by: Hayashi Mikihiro <[email protected]>
Signed-off-by: Hayashi Mikihiro <[email protected]>
Even when at curly braces, otherwise the parser can get stuck.

This has happened in the past in rust-lang#18625, but it was just worked around instead of handling the root of the problem. Now this happened again in rust-lang#20171. IMO we can't let `err_and_bump()` not bump, that's too confusing and invites errors. We can (as I did) workaround the worse recovery instead.
I opted to not include enum variant imports, only under the enum, and to not gate this behind a setting.
feat: Include enum variants in world symbols
fix: Always bump in the parser in `err_and_bump()`
fix: Fix a case where the link type was `None`
…ent_up

Migrate `pull_assignment_up` assist to use`SyntaxEditor`
…xrvpywtvoys

Revert "Re-enable fixpoint iteration for variance computation"
There is no need to, it's already stored in the `kind`.
…field

feat: Generate `new` for tuple struct
Because apparently, we were not accepting inline asm in item position, completely breaking it.
It's failing to much. We need to fix it, but my changes are unlikely to be the cause.
…ed_struct

Migrate `convert_named_struct_to_tuple_struct` assist to use 'SyntaxEditor'
We need it because `global_asm!()` is an item. It's unfortunate that such thing can slip in and I see no way to automatically catch that, but thankfully analysis-stats on self has caught that.
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 .`.
A4-Tacks and others added 13 commits July 16, 2025 17:16
- AsRef -> AsMut
- Borrow -> BorrowMut

Example
====================

```rust
//- minicore: as_ref
struct Foo(i32);

impl<T> core::convert::AsRef$0<i32> for Foo {
    fn as_ref(&self) -> &i32 {
        &self.0
    }
}
```
->
```rust
struct Foo(i32);

$0impl<T> core::convert::AsMut<i32> for Foo {
    fn as_mut(&mut self) -> &mut i32 {
        &self.0
    }
}

impl<T> core::convert::AsRef<i32> for Foo {
    fn as_ref(&self) -> &i32 {
        &self.0
    }
}
```
Add AsRef and Borrow for generate_mut_trait_impl
Add tailexpr & -> &mut for generate_mut_trait_impl
* `examples/minimal_lsp.rs` – compact LSP server showing definition,
  completion, hover, rustfmt-based formatting, and dummy diagnostics.
  Advertises UTF-8 offset encoding.

* `examples/manual_test.sh` – FIFO script that streams the canonical
  nine LSP packets so anyone can validate the server from two terminals.

No new runtime deps; `anyhow` stays under [dev-dependencies].
…e-clean

examples: add `minimal_lsp.rs` and FIFO test script
…d-from

Add ide-assist, generate single field struct From
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@lnicola
Copy link
Member Author

lnicola commented Jul 18, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

📌 Commit 1308726 has been approved by lnicola

It is now in the queue for this repository.

@bors bors 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 Jul 18, 2025
@matthiaskrgr
Copy link
Member

@bors p=6 sandwiching between rollups

@lnicola
Copy link
Member Author

lnicola commented Jul 18, 2025

Rolling it up should be fine too.

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

⌛ Testing commit 1308726 with merge 6caa224...

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 6caa224 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2025
@bors bors merged commit 6caa224 into rust-lang:master Jul 18, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 18, 2025
Copy link
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 6c0a912 (parent) -> 6caa224 (this PR)

Test differences

Show 4 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 6caa224a242d4c7b06c317969c51862815a4454b --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. x86_64-apple-2: 5456.9s -> 2969.2s (-45.6%)
  2. x86_64-apple-1: 9982.8s -> 6726.3s (-32.6%)
  3. dist-x86_64-apple: 9854.8s -> 7237.9s (-26.6%)
  4. dist-apple-various: 8177.9s -> 6159.8s (-24.7%)
  5. tidy: 76.4s -> 62.4s (-18.4%)
  6. pr-check-2: 2614.1s -> 2215.4s (-15.3%)
  7. x86_64-gnu-llvm-19-2: 6539.8s -> 5646.2s (-13.7%)
  8. i686-gnu-nopt-1: 8078.1s -> 7124.8s (-11.8%)
  9. pr-check-1: 1704.6s -> 1511.8s (-11.3%)
  10. aarch64-apple: 4929.2s -> 4380.4s (-11.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.

@lnicola lnicola deleted the sync-from-ra branch July 18, 2025 12:07
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6caa224): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.7%, secondary 4.1%)

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

mean range count
Regressions ❌
(primary)
3.7% [3.7%, 3.7%] 1
Regressions ❌
(secondary)
4.1% [4.1%, 4.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.7% [3.7%, 3.7%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 465.309s -> 465.653s (0.07%)
Artifact size: 374.62 MiB -> 374.62 MiB (-0.00%)

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

Successfully merging this pull request may close these issues.