Skip to content
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

Subtree update of rust-analyzer #136117

Merged
merged 67 commits into from
Jan 29, 2025
Merged

Subtree update of rust-analyzer #136117

merged 67 commits into from
Jan 29, 2025

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Jan 27, 2025

r? @ghost

ThouCheese and others added 30 commits January 18, 2025 19:35
internal: Move dual blanket impl logic from source analyzer to goto_def
This time, when completing the keyword (e.g. `fn` + whitespace).

The bug was actually a double-bug:
First, we did not resolve the impl in the macro-expanded file but in the real file, which of course cannot work.
Second, in analysis the whitespace was correlated with the `impl` and not the incomplete `fn`, which caused fake (where we insert an identifier after the whitespace) and real expansions to go out of sync, which failed analysis. The fix is to skip whitespaces in analysis.
fix: Only refresh syntax tree view when the active document changes
fix: Fix missing upmapping in trait impls completion
internal: Cleanup `Name` string rendering
Goto `Display::fmt` when invoked on `to_string`
…t don't

I don't think my ranking is perfect, because it places them even behind snippet completions, but this is something.
fix: Sort completion items that skip `await` and  `iter()` behind those that don't
If the user doesn't have rustc on $PATH, rust-analyzer won't be able
to run `rustc --print cfg`. This isn't really an error, as
rust-analyzer can still proceed without it.

This is particularly noticeable when loading crates defined in a
rust-project.json. Until the configuration is loaded, the opened files
are briefly treated as detached files and users see this error.

Environments with rust-project.json generally have a sysroot and rustc
elsewhere, so the error confuses users.
Ensure that all the fields that rust-analyzer understands are in the
manual, they all have doc comments, and they use consistent
punctuation (`;` rather than mixing `,` and `;`).

Whilst we're here, fix the `sysroot_src` example and add 2024 as a
legal value for Rust edition.
manual: Document all rust-project.json fields
The limit was introduced in rust-lang/rust-analyzer#1408 (comment) to avoid infinite cycles but it effectively caps the number of derefs to 10. Types like `ID3D12Device14` from the `windows` crate run into this because it derefs to `ID3D12Device13`, 13 to 12 and so on. Increasing it to 20 is a quick fix; a better cycle detection method would be nicer long term.
increase `AUTODEREF_RECURSION_LIMIT` to 20
Update outdated permissions section in the README.md
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 27, 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

@lnicola
Copy link
Member Author

lnicola commented Jan 27, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Jan 27, 2025

📌 Commit a7cbe4b 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 27, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 27, 2025
Subtree update of `rust-analyzer`

r? `@ghost`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#135876 (fix doc for std::sync::mpmc)
 - rust-lang#135961 (Fix 2/4 tests skipped by opt-dist)
 - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library)
 - rust-lang#136098 (Downgrade `linker-warnings` to allow-by-default)
 - rust-lang#136110 (Miri subtree update)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#135876 (fix doc for std::sync::mpmc)
 - rust-lang#135961 (Fix 2/4 tests skipped by opt-dist)
 - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library)
 - rust-lang#136098 (Downgrade `linker-warnings` to allow-by-default)
 - rust-lang#136110 (Miri subtree update)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 28, 2025
Subtree update of `rust-analyzer`

r? ``@ghost``
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#133151 (Trim extra whitespace in fn ptr suggestion span)
 - rust-lang#133929 (Remove -Zinline-in-all-cgus and clean up tests/codegen-units/)
 - rust-lang#134290 (Windows x86: Change i128 to return via the vector ABI)
 - rust-lang#135886 (Document purpose of closure in from_fn.rs more clearly)
 - rust-lang#136012 (Document powf and powi values that are always 1.0)
 - rust-lang#136104 (Add mermaid graphs of NLL regions and SCCs to polonius MIR dump)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)
 - rust-lang#136143 (Update books)
 - rust-lang#136153 (Locate asan-odr-win with other sanitizer tests)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2025
Subtree update of `rust-analyzer`

r? `@ghost`
@bors
Copy link
Contributor

bors commented Jan 28, 2025

⌛ Testing commit a7cbe4b with merge 79c7685...

@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
Contributor

bors commented Jan 28, 2025

💔 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 28, 2025
@lnicola
Copy link
Member Author

lnicola commented Jan 29, 2025

@bors retry runner crash

@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 29, 2025
@bors
Copy link
Contributor

bors commented Jan 29, 2025

⌛ Testing commit a7cbe4b with merge 61cc3e5...

@bors
Copy link
Contributor

bors commented Jan 29, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 29, 2025
@bors bors merged commit 61cc3e5 into rust-lang:master Jan 29, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 29, 2025
@lnicola lnicola deleted the sync-from-ra branch January 29, 2025 11:27
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (61cc3e5): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

Results (primary -0.7%, secondary 0.9%)

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
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-0.7%, -0.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: 778.134s -> 775.532s (-0.33%)
Artifact size: 328.46 MiB -> 328.40 MiB (-0.02%)

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.