Skip to content

Releases: rust-lang/rust-analyzer

2021-08-30

30 Aug 05:04
d15f646
Compare
Choose a tag to compare
Merge #10074

10074: internal: improve compile times a bit r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

2021-08-23

23 Aug 05:04
996300f
Compare
Choose a tag to compare
Merge #9989

9989: Fix two more “a”/“an” typos (this time the other way) r=lnicola a=steffahn

Follow-up to #9987

you guys are still merging these fast :sweat_smile:

_this time I thought – for sure – that I’d get this commit into #9987 before it’s merged…_

Co-authored-by: Frank Steffahn <frank.steffahn@stu.uni-kiel.de>

2021-08-16

16 Aug 04:44
b641a66
Compare
Choose a tag to compare
Merge #9905

9905: internal: optimize compile time r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

2021-08-09

09 Aug 06:29
5664a2b
Compare
Choose a tag to compare
Merge #9814

9814: Generate default impl when converting `#[derive(Debug)]` to manual impl r=yoshuawuyts a=yoshuawuyts

This patch makes it so when you convert `#[derive(Debug)]` to a manual impl, a default body is provided that's equivalent to the original output of `#[derive(Debug)]`. This should make it drastically easier to write custom `Debug` impls, especially when all you want to do is quickly omit a single field which is `!Debug`.

This is implemented for enums, record structs, tuple structs, empty structs - and it sets us up to implement variations on this in the future for other traits (like `PartialEq` and `Hash`).

Thanks!

## Codegen diff
This is the difference in codegen for record structs with this patch:
```diff
struct Foo {
    bar: String,
}

impl fmt::Debug for Foo {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        todo!();
+        f.debug_struct("Foo").field("bar", &self.bar).finish()
    }
}
```

Co-authored-by: Irina Shestak <shestak.irina@gmail.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts+github@gmail.com>

2021-08-02

02 Aug 05:44
df0936b
Compare
Choose a tag to compare
Merge #9750

9750: Link “DST” to its definition r=lnicola a=gthb

Being new to Rust I wasn't familiar with this acronym and found it hard to guess (the context of syntax trees biased me to reading it as a D-something Syntax Tree and trying to guess what the D was), hard to google (in retrospect googling "rust dst" does the job, but I thought it was an abstract structure thing, not Rust-specific), and hard to Github-search, because `dst` is commonly short for “destination” in code.

Alternatively `<abbr title="dynamically sized type">DST</abbr>` would be about as helpful.

Co-authored-by: Gunnlaugur Thor Briem <gunnlaugur@gmail.com>

2021-07-26

26 Jul 06:39
5983d37
Compare
Choose a tag to compare
Merge #9691

9691: fix: Keep catch-all arm in fill_match_arms if it has a non-empty expression r=Veykril a=Veykril

Fixes #4165
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>

2021-07-19

19 Jul 06:05
ea105f9
Compare
Choose a tag to compare
Merge #9619

9619: Support GATs for associated type arg parsing r=Veykril a=Veykril

Fixes #9602

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>

2021-07-12

12 Jul 04:50
fe00358
Compare
Choose a tag to compare
Merge #9569

9569: internal: Explicitly check for reference locals or fields in Name classification r=Veykril a=Veykril

Closes #7524
Inlines all the calls to reference related name classification as well as emits both goto definition targets for field shorthands.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>

2021-07-05

05 Jul 04:25
e5c1c8c
Compare
Choose a tag to compare
Merge #9490

9490: minor: untangle complex condition r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>

2021-06-28

28 Jun 04:33
1fa82ad
Compare
Choose a tag to compare
Merge #9413

9413: internal: Deduplicate ast expression walking logic r=Veykril a=Veykril

Deduplicates the duplication introduced in #9375 and #9396 while also fixing a few bugs in both the assist and related highlighting.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>