Skip to content

Releases: rust-lang/rust-analyzer

2021-10-04

04 Oct 05:26
4b7675f

Choose a tag to compare

Merge #10442

10442: fix: Limit depth to 1 when searching for `Cargo.toml` r=matklad a=lnicola

...and add `rust-project.json`.

More or less fixes #7268

Co-authored-by: Laurențiu Nicola <[email protected]>

2021-09-27

27 Sep 05:46
009e6ce

Choose a tag to compare

Merge #10360

10360: headsup: matklad rewrites blocks grammar again :) r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <[email protected]>

2021-09-20

20 Sep 12:33
f1d7f98

Choose a tag to compare

Merge #10293

10293: fix: Don't bail on parse errors in macro input for builtin expansion r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8158

Co-authored-by: Lukas Wirth <[email protected]>

2021-09-13

13 Sep 05:37
516eb40

Choose a tag to compare

Merge #10215

10215: Use correct file syntax node for decl_access computation in find_all_refs r=Veykril a=Veykril

Defs and refs of locals only ever life in one file, this isn't true for fields though.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10201

bors r+

Co-authored-by: Lukas Wirth <[email protected]>

2021-09-06

06 Sep 06:40
b73b321

Choose a tag to compare

Merge #10161

10161: Don't dump `DefMap`s to build the panic context r=matklad a=matklad

internal: remove accidental code re-use
FragmentKind played two roles:

* entry point to the parser
* syntactic category of a macro call

These are different use-cases, and warrant different types. For example,
macro can't expand to visibility, but we have such fragment today.

This PR introduces `ExpandsTo` enum to separate this two use-cases.

I suspect we might further split `FragmentKind` into `$x:specifier` enum
specific to MBE, and a general parser entry point, but that's for
another PR!

bors r+
🤖

Co-authored-by: Aleksey Kladov <[email protected]>

2021-08-30

30 Aug 05:04
d15f646

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 <[email protected]>

2021-08-23

23 Aug 05:04
996300f

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 <[email protected]>

2021-08-16

16 Aug 04:44
b641a66

Choose a tag to compare

Merge #9905

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

bors r+
🤖

Co-authored-by: Aleksey Kladov <[email protected]>

2021-08-09

09 Aug 06:29
5664a2b

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 <[email protected]>
Co-authored-by: Yoshua Wuyts <[email protected]>
Co-authored-by: Yoshua Wuyts <[email protected]>

2021-08-02

02 Aug 05:44
df0936b

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 <[email protected]>