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 #122272

Merged
merged 112 commits into from
Mar 10, 2024
Merged

Subtree update of rust-analyzer #122272

merged 112 commits into from
Mar 10, 2024

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Mar 10, 2024

r? ghost

Young-Flash and others added 30 commits February 21, 2024 10:57
Update rustc_pattern_analysis

This should fix rust-lang/rust-analyzer#16656 but I can't check because we don't have a reproducer.
fix: Add basic support for Native Debug

Native Debug doesn't work very well and passing command-line arguments is nasty (rust-lang/rust-analyzer#9815), but I guess it's a start.

Closes rust-lang#9815
…ykril

fix: autocomplete constants inside format strings

Hi! This PR adds autocompletion for constants (including statics) inside format strings and closes rust-lang#16608.

I'm not sure about adding the `constants` field to the `CompletionContext`. It kinda makes sense, since it's in line with the `locals` field, and this way everything looks a bit cleaner, but at the same time does it really need to be there?

Anyway, let me know if anything should/can be changed. :)
fix: use 4 spaces for indentation in macro expansion

Partial fix for rust-lang#16471.

In the previous code, the indentation produced by macro expansion was set to 2 spaces. This PR modifies it to 4 spaces for the sake of consistency.
Add more methods for resolving definitions from AST to their corresponding HIR types

In order to be able to add these methods with consistent naming I had to also rename two existing methods that would otherwise be conflicting/confusing:

`Semantics::to_module_def(&self, file: FileId) -> Option<Module>` (before)
`Semantics::file_to_module_def(&self, file: FileId) -> Option<Module>` (after)

`Semantics::to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module>` (before)
`Semantics::file_to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module>` (after)

(the PR is motivated by an outside use of the `ra_ap_hir` crate that would benefit from being able to walk a `hir::Function`'s AST, resolving its exprs/stmts/items to their HIR equivalents)
Avoid some allocations

I went on a small `.clone()` hunting tour :D
internal: Clean some stuff up

Just a bunch of small refactorings, mainly from browsing through `hir-def`
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 10, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 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 Mar 10, 2024

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Mar 10, 2024

📌 Commit 56493e4 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 Mar 10, 2024
@rust-log-analyzer

This comment has been minimized.

@matthiaskrgr
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 10, 2024
@rust-log-analyzer

This comment has been minimized.

@lnicola
Copy link
Member Author

lnicola commented Mar 10, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Mar 10, 2024

📌 Commit b4e3b2e 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 10, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 10, 2024
Subtree update of `rust-analyzer`

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#121573 (unix_sigpipe: Add test for SIGPIPE disposition in child processes)
 - rust-lang#121754 ([bootstrap] Move the `split-debuginfo` setting to the per-target section)
 - rust-lang#122205 (ensure that sysroot is properly set for cross-targets)
 - rust-lang#122257 (mir-opt tests: don't run a different set on --bless; enable --keep-stage-std)
 - rust-lang#122272 (Subtree update of `rust-analyzer`)

Failed merges:

 - rust-lang#122108 (Add `target.*.runner` configuration for targets)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Mar 10, 2024

⌛ Testing commit b4e3b2e with merge 9bd88ef...

@bors
Copy link
Contributor

bors commented Mar 10, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 10, 2024
@bors bors merged commit 9bd88ef into rust-lang:master Mar 10, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 10, 2024
@lnicola lnicola deleted the sync-from-ra branch March 10, 2024 16:59
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9bd88ef): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

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)
- - 0
Regressions ❌
(secondary)
2.7% [1.3%, 4.2%] 13
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 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: 648.121s -> 646.803s (-0.20%)
Artifact size: 309.99 MiB -> 309.98 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.