Skip to content

Subtree update of rust-analyzer #119732

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 104 commits into from
Jan 9, 2024
Merged

Subtree update of rust-analyzer #119732

merged 104 commits into from
Jan 9, 2024

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Jan 8, 2024

r? ghost

paul-jewell and others added 30 commits November 17, 2023 14:41
This is meant to implement SymbolInformation::enclosing_symbol, so we
can build the enclosing symbol from the enclosing moniker without
having the full enclosing token's TokenStaticData.
For local variables, this gets the moniker from the enclosing
definition and stores it into the TokenStaticData.
Then it builds the scip symbol for that moniker when building the
SymbolInformation.
…tion

To build the SymbolInformation::signature_documentation we need access
to the “label” when building the TokenStaticData, preferably without
any markdown markup.
Therefore this refactors ide::hover::render::definition and its helper
functions to give easier access to the label alone.
SymbolInformation::kind is finer-grained than the SCIP symbol suffix.
This also fixes a bug where all type aliases where treated like type
parameters.

```
trait SomeTrait {
  type AssociatedType; // ← this is SomeTrait#[AssociatedType]
}

type MyTypeAlias = u8; // ← this used to be [MyTypeAlias]
                       //   and now is MyTypeAlias#
```
fix: Fix focus range being discarded in attributes/derives when upmapping

Fixes rust-lang/rust-analyzer#16229
…eykril

SCIP: populate new SymbolInformation fields

Fixes rust-lang#15919
Updated instructions for installing rust-analyzer under Gentoo.

No need to install the guru overlay to install rust-analyzer. This is now installed based on use flag settings for dev-lang/rust and dev-lang/rust-bin. This pull request changes the instructions in the user manual.

Note: rust-analyzer is not available in the guru repository, so the old instructions no longer work.
fix: try obligation of `IndexMut` when infer

Closes rust-lang#15842.

This issue arises because `K` is ambiguous if only inferred from `Index` trait, but is unique if inferred from `IndexMut`, but r-a doesn't use this info.
feat: resolve inherent and implemented associated items in docs

This partially fixes rust-lang#9694.

Supported:
- Trait methods and constants.
  * Due to resolution differences pointed out during the review of the PR, trait associated types are _not_ supported.
- Inherent methods, constants and associated types.
  * Inherent associated types are a [nightly feature](rust-lang#8995), and are supported with no additional work in this PR.

Screenshot of VS Code running with the change:

<img width="513" alt="image" src="https://github.com/rust-lang/rust-analyzer/assets/7189784/c37ed8b7-b572-4684-8e81-2a817b0027c4">

You can see that the items are resolved (excl. trait associated types) since they are semantically highlighted in the doc comment.
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2024

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

@lnicola
Copy link
Member Author

lnicola commented Jan 8, 2024

@bors r+ p=1 subtree update

@bors
Copy link
Collaborator

bors commented Jan 8, 2024

📌 Commit fd63ff0 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 Jan 8, 2024
@bors
Copy link
Collaborator

bors commented Jan 8, 2024

⌛ Testing commit fd63ff0 with merge f42b26a...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2024
Subtree update of `rust-analyzer`

r? ghost
@bors
Copy link
Collaborator

bors commented Jan 8, 2024

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 8, 2024
@lnicola
Copy link
Member Author

lnicola commented Jan 8, 2024

@bors retry

@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 Jan 8, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Collaborator

bors commented Jan 8, 2024

⌛ Testing commit fd63ff0 with merge 6fe5158...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2024
Subtree update of `rust-analyzer`

r? ghost
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] cargo_metadata test:false 1.785
[RUSTC-TIMING] toml test:false 0.818
 Documenting rustfmt-nightly v1.7.0 (/checkout/src/tools/rustfmt)
[RUSTC-TIMING] rustfmt_nightly test:false 11.126
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
   Generated /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-tools/aarch64-unknown-linux-gnu/doc/rustfmt_config_proc_macro/index.html
   Generated /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-tools/aarch64-unknown-linux-gnu/doc/rustfmt_nightly/index.html
   Generated /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-tools/aarch64-unknown-linux-gnu/doc/cargo_fmt/index.html
   Generated /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-tools/aarch64-unknown-linux-gnu/doc/git_rustfmt/index.html
---
##[group]Building tool error_index_generator (stage1 -> stage2, aarch64-unknown-linux-gnu)

##[group]Clock drift check
  local time: Tue Jan  9 00:02:08 UTC 2024
Session terminated, killing shell... ...killed.
##[error]The operation was canceled.
Cleaning up orphan processes

@bors
Copy link
Collaborator

bors commented Jan 9, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 9, 2024
@lnicola
Copy link
Member Author

lnicola commented Jan 9, 2024

@bors retry runner quit

@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 Jan 9, 2024
@bors
Copy link
Collaborator

bors commented Jan 9, 2024

⌛ Testing commit fd63ff0 with merge a399117...

@bors
Copy link
Collaborator

bors commented Jan 9, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 9, 2024
@bors bors merged commit a399117 into rust-lang:master Jan 9, 2024
@rustbot rustbot added this to the 1.77.0 milestone Jan 9, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a399117): 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

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
2.8% [2.3%, 3.3%] 2
Improvements ✅
(primary)
-0.6% [-0.7%, -0.5%] 2
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) 0.6% [-0.7%, 3.0%] 3

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

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

Bootstrap: 669.325s -> 668.946s (-0.06%)
Artifact size: 308.52 MiB -> 308.45 MiB (-0.02%)

@lnicola lnicola deleted the sync-from-ra branch January 9, 2024 07:01
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.