Skip to content

⬆️ rust-analyzer #112784

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
Jun 19, 2023
Merged

⬆️ rust-analyzer #112784

merged 104 commits into from
Jun 19, 2023

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Jun 19, 2023

r? @ghost

davidlattimore and others added 30 commits May 29, 2023 21:24
The workflow is currently failing because it's trying to publish 0.0.16,
while the last version published was 0.0.149.
`replace_derive_with_manual_impl` was slightly since it used
`add_trait_assoc_items_to_impl`
(which was also used by `add_missing_impl_members`)
fix: Fix ci never running on nightly when proc-macro things change

Was wondering why this wasn't running on the subtree sync ...
…c-str, r=HKalbasi

feat: inline const as literal

Assist: inline_const_as_literal

Evaluate and inline const variable as literal.

```rust
const STRING: &str = "Hello, World!";

fn something() -> &'static str {
    STR$0ING
}
```
->
```rust
const STRING: &str = "Hello, World!";

fn something() -> &'static str {
    "Hello, World!"
}
```
…oc, r=HKalbasi

fix: only generate trait bound for associated types in field types

Given the following definitions:

```rust
trait Trait {
    type A;
    type B;
    type C;
}

#[derive(Clone)]
struct S<T: Trait>
where
    T::A: Send,
{
    qualified: <T as Trait>::B,
    shorthand: T::C,
}
```

we currently expand the derive macro to:

```rust
impl<T> Clone for S<T>
where
    T: Trait + Clone,
    T::A: Clone,
    T::B: Clone,
    T::C: Clone,
{ /* ... */ }
```

This does not match how rustc expands it. Specifically, `Clone` bounds for `T::A` and `T::B` should not be generated.

The criteria for associated types to get bound seem to be 1) the associated type appears as part of field types AND 2) it's written in the shorthand form. I have no idea why rustc doesn't consider qualified associated types (there's even a comment that suggests they should be considered; see rust-lang#50730), but it's important to follow rustc.
…nicola

Fix typo in reload.rs

Thanks for the amazing LSP! I found a small typo and fixed it.
internal: Fix dependency warning

Hope this doesn't break rust-lang#14984 again.
rust-analyzer supports both `sysroot` and `sysroot_src` in
`rust-project.json`. Document `sysroot` and show example values for
both fields.
ponyii and others added 17 commits June 16, 2023 20:34
internal: Do not allocate unnecessarily when importing macros from parent modules
internal: Add more context to overly long loop turn message
internal: Analyze all bodies in analysis-stats, not just functions
analysis-stats: Add body lowering step, track time of each step separtely
…do-not-transform-const-params, r=lowr

fix: implement missing members doesn't transform const params and default types

Fixes rust-lang/rust-analyzer#13363
fix: Add binding definition for for-expr iterator desugared binding
internal: Shrink size of hir::Binding
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2023

Some changes occurred in src/tools/rust-analyzer

cc @rust-lang/rust-analyzer

@lnicola
Copy link
Member Author

lnicola commented Jun 19, 2023

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Jun 19, 2023

📌 Commit 4004f5a 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 Jun 19, 2023
@bors
Copy link
Collaborator

bors commented Jun 19, 2023

⌛ Testing commit 4004f5a with merge 3c9e070...

@bors
Copy link
Collaborator

bors commented Jun 19, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 19, 2023
@bors bors merged commit 3c9e070 into rust-lang:master Jun 19, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 19, 2023
@lnicola lnicola deleted the sync-from-ra branch June 19, 2023 10:57
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3c9e070): 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)
- - 0
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 653.833s -> 657.557s (0.57%)

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.