Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Dec 1, 2025

Subtree update of rust-analyzer to rust-lang/rust-analyzer@d690155.

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

r? @ghost

ChayimFriedman2 and others added 30 commits July 10, 2025 01:22
Instead of the hygiene what happens to be in the same fake range.
Because, as it turns out, this is necessary to determine the correct edition (it is not global).

The next commits will make use of it.
Example
---
```rust
let arg_list = make::arg_list([make::expr_literal("1").into(), make::expr_literal("2").into()]);
let mut editor = SyntaxEditor::new(arg_list.syntax().clone());
let target_expr = make::expr_literal("3").clone_for_update();

for arg in arg_list.args() {
    editor.replace(arg.syntax(), target_expr.syntax());
}

let edit = editor.finish();
let expect = expect![["(3, 3)"]];
expect.assert_eq(&edit.new_root.to_string());
```

**Before this PR**

```text
(, )3
```

**After this PR**

```text
(3, 3)
```
Previously we didn't set the enclosing position on definitions, so
SCIP consumers didn't know the position of the entire definition that
provides the symbol.
Example
---
```rust
extern "C" $0
```

**Before this PR**

Can't be completion

**After this PR**

```text
kw async
kw const
kw enum
kw fn
kw impl
kw impl for
kw mod
kw pub
kw pub(crate)
kw pub(super)
kw static
kw struct
kw trait
kw type
kw union
kw unsafe
kw use
```

---

```rust
extern $0
```

**Before this PR**

Can't be completion

**After this PR**

```rust
extern crate $0;
```
Via separate methods.

This is both more clear, shorter, and will be required for the next commit.
Lang items rarely change, so putting a query for each doesn't give us anything. On the other hand, putting them behind only one query not only saves memory, it also has a giant benefit: we can store the struct with all lang items in the interner, making access to them very cheap. That basically means that anything in the hot path can avoid a *very common* query, and exchange it for a simple field access.
…-crate-comp

Fix complete after `extern`, add `crate` completion
feature: Set enclosing_range field on SCIP output
What a single operator precedence can do :)
fix: Don't run cache priming when disabled in settings
…ken-edition

fix: Use per-token, not global, edition in the parser
…hygiene

fix: Use root hygiene for speculative resolution
…rules

This was hard to do because of the separation between `mbe` and `hir-expand`, but became possible by the Salsa migration, as now `SyntaxContext` doesn't require `ExpandDatabase`, `salsa::Database` is enough.
It tests the opposite of the correct behavior.
fix: Pass the correct per-token (not global) edition when expanding macro_rules
proc-macro-srv: Fix unnecessary subtree wrapping in protocol
…ate-changed

Fix syntax_editor duplicated changed element
VS Code only offers a dropdown if a the toplevel property description
is `enum`. For `anyOf` (a JSON schema feature), we don't get that
helpful UI.

Whilst the previous version marked `preserve` as deprecated, the VS
Code UI didn't do anything special when users chose that value.

Instead, use an enum so we get the helpful dropdown, and just use the
description to highlight the deprecated value.

Relevant docs:

https://code.visualstudio.com/api/references/contribution-points#:~:text=The%20enumDescriptions%20property%20provides%20a,will%20be%20parsed%20as%20Markdown.

https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-10.2.1.2
fix Display scope inlay hints after closing brace for more types of blocks rust-lang#18833
…ropdown

fix: rust-analyzer.imports.granularity.group should get a dropdown UI
Veykril and others added 13 commits November 30, 2025 08:52
…ctions

fix: Rewrite dyn trait lowering to follow rustc
Turns out we're not using it anymore.
internal: Remove the block from `DbInterner`
I missed a ["__0"] to access the str in the Static case.

Also, simplify the code to rely on the pretty printer for str
rather than accessing data_ptr/length directly. This makes it
more robust against changes in str.

Output before: "<SmolStr Static error: There is no member named data_ptr.>"
Output after: "preferred-width"
gdb pretty printer: fix printing when using Repr::Static
internal: Ensure proc-macro-api version check works with postcard across protocol versions
This updates the rust-version file to dfe1b8c.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: dfe1b8c
Filtered ref: d3d1f3831e6b7fa73889d90bc8dd56d22cb80834
Upstream diff: rust-lang/rust@1be6b13...dfe1b8c

This merge was created using https://github.com/rust-lang/josh-sync.
minor: Option-box `crate_lang_items` query result
minor: Use `Itertools::exactly_one` in a couple more places
@rustbot
Copy link
Collaborator

rustbot commented Dec 1, 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 rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Dec 1, 2025
@lnicola
Copy link
Member Author

lnicola commented Dec 1, 2025

@bors r+ p=2 help some proc macro server changes catch the train

@bors
Copy link
Collaborator

bors commented Dec 1, 2025

📌 Commit ad61e76 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 Dec 1, 2025
@bors
Copy link
Collaborator

bors commented Dec 1, 2025

⌛ Testing commit ad61e76 with merge 2fb8053...

@bors
Copy link
Collaborator

bors commented Dec 1, 2025

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 2fb8053 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 1, 2025
@bors bors merged commit 2fb8053 into rust-lang:main Dec 1, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Dec 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

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 9b82a4f (parent) -> 2fb8053 (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 2fb805367dd3012ce5c50865d03c86e70bf10f0f --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. dist-apple-various: 3679.9s -> 4144.4s (+12.6%)
  2. dist-x86_64-musl: 7526.6s -> 8435.9s (+12.1%)
  3. pr-check-2: 2295.0s -> 2529.5s (+10.2%)
  4. test-various: 6004.9s -> 6580.4s (+9.6%)
  5. aarch64-apple: 8215.6s -> 8988.7s (+9.4%)
  6. aarch64-msvc-1: 6513.1s -> 7095.1s (+8.9%)
  7. dist-ohos-aarch64: 4359.0s -> 4033.0s (-7.5%)
  8. dist-x86_64-apple: 8513.1s -> 7914.8s (-7.0%)
  9. aarch64-msvc-2: 5211.3s -> 4858.5s (-6.8%)
  10. dist-i686-msvc: 8271.7s -> 7715.5s (-6.7%)
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
Collaborator

Finished benchmarking commit (2fb8053): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (primary -2.1%)

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

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

Cycles

Results (secondary -1.7%)

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

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

Binary size

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

Bootstrap: 474.873s -> 471.488s (-0.71%)
Artifact size: 386.96 MiB -> 386.96 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. 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.