Skip to content

Releases: rust-lang/rust-analyzer

2022-01-10

10 Jan 06:48
0f8c96c

Choose a tag to compare

Merge #11238

11238: fix: shrink the span of errors from attribute macros and derives r=jonas-schievink a=jonas-schievink

Some procedural macros tend to get very large invocations, for example RTIC's, leading to issues like https://github.com/rtic-rs/cortex-m-rtic/issues/582, where almost the entire screen is underlined while editing incomplete code in the macro.

This PR shrinks the spans of errors from attribute macros and derives to point only at the attribute, which also matches rustc more closely.

bors r+

Co-authored-by: Jonas Schievink <[email protected]>

2022-01-03

03 Jan 08:12
8e9ccbf

Choose a tag to compare

Merge #11177

11177: internal: dont descend into comments r=Veykril a=jhgg

fixes #11176

Co-authored-by: Jake Heinz <[email protected]>

2021-12-27

27 Dec 16:18
6831918

Choose a tag to compare

Merge #11122

11122: Remove note about alpha status from vscode extension descritpion r=lnicola a=aDotInTheVoid

See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/156 and https://github.com/rust-analyzer/rust-analyzer/pull/8237

Co-authored-by: Nixon Enraght-Moony <[email protected]>

2021-12-20

20 Dec 07:32
0add6e9

Choose a tag to compare

Merge #11060

11060: minor: Bump deps r=lnicola a=lnicola



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

2021-12-13

13 Dec 06:21
db2a708

Choose a tag to compare

Merge #10995

10995: internal: switch from trait-based TokenSource to simple struct of arrays r=matklad a=matklad

cc #10765 

The idea here is to try to simplify the interface as best as we can. The original trait-based approach is a bit over-engineered and hard to debug. Here, we replace callback with just data. The next PR in series will replace the output `TreeSink` trait with data as well. 


The biggest drawback here is that we now require to materialize all parser's input up-front. This is a bad fit for macro by example: when you parse `$e:expr`, you might consume only part of the input. However, today's trait-based solution doesn't really help -- we were already materializing the whole thing! So, let's keep it simple!

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

2021-12-06

06 Dec 06:39
7d6fcbc

Choose a tag to compare

Merge #10944

10944: internal: Prefer resolution of inert attributes r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10942
bors r+

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

2021-11-29

29 Nov 15:51
d9b2291

Choose a tag to compare

Merge #10876

10876: fix: Show parameter hints unconditionally for logical not expressions r=Veykril a=Veykril

Closes https://github.com/rust-analyzer/rust-analyzer/issues/8491
bors r+

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

2021-11-22

22 Nov 11:39
183ef04

Choose a tag to compare

Merge #10823

10823: fix: better `Fn` traits formatting r=jonas-schievink a=veber-alex

This makes it so formatting `Fn` traits properly handles:

1. An `Fn` trait with only a single argument -> removes the trailing comma.
2. An `Fn` trait which returns nothing (an empty tuple) -> don't show `-> ()` as the return type.

before:
![before](https://user-images.githubusercontent.com/29788806/142745038-44ac68ce-de42-4396-a809-ffdb883be699.png)

after:
![after](https://user-images.githubusercontent.com/29788806/142745040-485feaa2-cc21-4a05-9576-5410ea355029.png)




Co-authored-by: Alex Veber <[email protected]>

2021-11-15

15 Nov 07:16
7366833

Choose a tag to compare

Merge #10767

10767: minor: Rename intern_macro -> intern_macro_call r=Veykril a=Veykril

We potentially want to intern macro definitions so the names would probably collide
bors r+

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

2021-11-08

08 Nov 07:08
2c0f433

Choose a tag to compare

Merge #10699

10699: internal: Make CompletionItem `label` and `lookup` fields `SmolStr`s r=Veykril a=Veykril

This replaces a bunch of String clones with SmolStr clones, though also makes a few parts a bit more expensive(mainly things involving `format!`ted strings as labels).


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