Skip to content

Releases: rust-lang/rust-analyzer

2020-08-17

17 Aug 11:26
0b2b9a5

Choose a tag to compare

Merge #5766

5766: Hacky support for fn-like proc macros r=matklad a=jonas-schievink

It turns out that this is all that's needed to get something like this working:

```rust
#[proc_macro]
pub fn function_like_macro(_args: TokenStream) -> TokenStream {
    TokenStream::from_str("fn fn_success() {}").unwrap()
}
```

```rust
function_like_macro!();

fn f() {
    fn_success();
}
```

The drawback is that it also makes this work, because there is no distinction between different proc macro kinds in the rest of r-a:

```rust
#[derive(function_like_macro)]
struct S {}

fn f() {
    fn_success();
}
```

Another issue is that it seems to panic, and then panic, when using this on the rustc code base, due to some issue in the inscrutable proc macro bridge code.

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

2020-08-10

10 Aug 13:40
f333650

Choose a tag to compare

Merge #5698

5698: Display the value of a const on the hover r=jonas-schievink a=JmPotato

Signed-off-by: JmPotato <[email protected]>

Close #4051 

To display the value of a const, I modified the implementation of `ShortLabel` for `ast::Const`.

Co-authored-by: JmPotato <[email protected]>

2020-08-04

04 Aug 09:42
2b0c2f6

Choose a tag to compare

Merge #5659

5659: Revert LineIndex optimizations to fix #5656 r=matklad a=lazear

This PR reverts the changes from https://github.com/rust-analyzer/rust-analyzer/pull/5532, which was causing issues as described in
https://github.com/rust-analyzer/rust-analyzer/issues/5656

Co-authored-by: Michael Lazear <[email protected]>

2020-08-03

03 Aug 10:57

Choose a tag to compare

Tweak style wording

2020-07-27

27 Jul 08:34
91b2f0b

Choose a tag to compare

Merge #5539

5539: SSR: Fix path resolution of locals in current scope r=matklad a=davidlattimore



Co-authored-by: David Lattimore <[email protected]>

2020-07-20

20 Jul 10:56
c9c518e

Choose a tag to compare

Merge #5438

5438: Fix a typo in completion docs r=kjeremy a=killercup



Co-authored-by: Pascal Hertleif <[email protected]>

2020-07-13

13 Jul 10:41
5ca7cd9

Choose a tag to compare

Merge #5331

5331: Fix #4966 r=flodiebold a=flodiebold

We add a level of binders when converting our function pointer to Chalk's; we need to remove it again on the way back.

Fixes #4966.

Co-authored-by: Florian Diebold <[email protected]>

2020-07-06

06 Jul 13:36
a5ae504

Choose a tag to compare

Merge #5234

5234: Fix: allow for binaries from $PATH to pass validity check r=matklad a=Veetaha

Tackles https://github.com/rust-analyzer/rust-analyzer/pull/5229#issuecomment-654151387
cc @matklad @lnicola 
Apparently `fs.existsSync()` works only with real paths and not with `$PATH` env var

Co-authored-by: Veetaha <[email protected]>

2020-06-29

29 Jun 12:38
ca31b1d

Choose a tag to compare

Merge #5105

5105: Simlify with matches!() r=matklad a=Veetaha



Co-authored-by: Veetaha <[email protected]>

2020-06-22

22 Jun 19:46
d8842e8

Choose a tag to compare

Merge #4899

4899: don't complete top level attrs inside nested attrs and add better labels r=matklad a=bnjjj

close #4890

Co-authored-by: Benjamin Coenen <[email protected]>