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

Merged
merged 89 commits into from
Mar 17, 2024
Merged

Subtree update of rust-analyzer #122628

merged 89 commits into from
Mar 17, 2024

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Mar 17, 2024

No description provided.

surechen and others added 30 commits February 18, 2024 16:38
… other situations like module-relative uses, we can do more accurate redundant import checking.

fixes rust-lang#117448

For example unnecessary imports in std::prelude that can be eliminated:

```rust
use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly
use std::option::Option::None; //~ WARNING the item `None` is imported redundantly
```
Tracking import use types for more accurate redundant import checking

fixes rust-lang#117448

By tracking import use types to check whether it is scope uses or the other situations like module-relative uses,  we can do more accurate redundant import checking.

For example unnecessary imports in std::prelude that can be eliminated:

```rust
use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly
use std::option::Option::None; //~ WARNING the item `None` is imported redundantly
```
From `impl Into<DiagnosticMessage>` to `impl Into<Cow<'static, str>>`.

Because these functions don't produce user-facing output and we don't
want their strings to be translated.
minor: sync last two releases from downstream

Turns out I made quite a mess on the last two syncs, and this PR is a mess too, but I hope it's fine.
internal: Remove synstructure const hack support

The latest version of it no longer emits these
Veykril and others added 4 commits March 16, 2024 17:49
fix: Fix wrong where clause rendering on hover

We were not accounting for proper newline indentation in some places making the hover look weird (or just straight up wrong for type aliases)
fix: incorrect handling of `use` and panic issue in `extract_module`.

fix rust-lang#16826

This PR includes the following changes:

1. Simplify the implementation partially, removing many unnecessary loops and `clone()`.

2. When it is found that the top level of the selection contains a `use` statement, a copy of the `use` will be reinserted before extraction. (rust-lang#16826)

3. Fixed an issue during `extract_module`, where if the top level of the selected part contains `A` and `use A::B`, it caused a duplication of `use A`.
@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 17, 2024
@rustbot
Copy link
Collaborator

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

r? ghost

@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2024

Failed to set assignee to ghost: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@lnicola
Copy link
Member Author

lnicola commented Mar 17, 2024

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Mar 17, 2024

📌 Commit 20ecf07 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 17, 2024
@bors
Copy link
Contributor

bors commented Mar 17, 2024

⌛ Testing commit 20ecf07 with merge 8e918b7...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 17, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test util::network::retry::with_retry_repeats_the_call_then_works ... ok

failures:

---- util::network::sleep::returns_in_order stdout ----
thread 'util::network::sleep::returns_in_order' panicked at src/cargo\util\network\sleep.rs:101:5:
  left: [1, 3, 2, 5, 6]
 right: [1, 2, 3, 5, 6]


@bors
Copy link
Contributor

bors commented Mar 17, 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 Mar 17, 2024
@lnicola
Copy link
Member Author

lnicola commented Mar 17, 2024

Huh

@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 Mar 17, 2024
@bors
Copy link
Contributor

bors commented Mar 17, 2024

⌛ Testing commit 20ecf07 with merge a0c20d5...

@bors
Copy link
Contributor

bors commented Mar 17, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2024
@bors bors merged commit a0c20d5 into rust-lang:master Mar 17, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 17, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a0c20d5): 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)
-1.1% [-1.1%, -1.1%] 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)
6.2% [6.2%, 6.2%] 1
Improvements ✅
(primary)
-2.2% [-2.4%, -2.0%] 9
Improvements ✅
(secondary)
-3.3% [-4.6%, -1.8%] 21
All ❌✅ (primary) -2.2% [-2.4%, -2.0%] 9

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
Regressions ❌
(secondary)
2.7% [1.1%, 4.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 667.964s -> 668.793s (0.12%)
Artifact size: 312.79 MiB -> 312.78 MiB (-0.00%)

@lnicola lnicola deleted the sync-from-ra branch March 17, 2024 15:54
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.