Skip to content

Releases: rust-lang/rust-analyzer

2020-10-19

19 Oct 13:03
b19040f

Choose a tag to compare

Merge #6280

6280: :arrow_up: crates r=matklad a=matklad

bors r+
🤖

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

2020-10-12

12 Oct 12:20
518f6d7

Choose a tag to compare

Merge #5917

5917: Add a command to open docs for the symbol under the cursor r=matklad a=zacps

#### Todo

- [ ] Decide if there should be a default keybind or context menu entry
- [x] Figure out how to get the documentation path for methods and other non-top-level defs
- [x] Design the protocol extension. In future we'll probably want parameters for local/remote documentation URLs, so that should maybe be done in this PR?
- [x] Code organisation
- [x] Tests


Co-authored-by: Zac Pullar-Strecker <[email protected]>

2020-10-05

05 Oct 14:38
e5f252a

Choose a tag to compare

Merge #5997

5997: Better inlay hints in 'for' loops r=popzxc a=popzxc

For #5206 (one part of the fix).

This PR refines the logic of spawning an inlay hints in `for` loops. We only must provide a hint if the following criteria are met:

- User already typed `in` keyword.
- Type of expression is known and it's not unit.

**However:** I don't know why, but I was unable to make `complete_for_hint` test work. Either without or with my changes, I was always getting this test failed because no hint was spawned for the loop variable.

This change works locally, so I would really appreciate an explanation why this test isn't working now and how to fix it.

![image](https://user-images.githubusercontent.com/12111581/93024580-41a53380-f600-11ea-9bb1-1f8ac141be95.png)

Co-authored-by: Igor Aleksanov <[email protected]>

2020-09-28

28 Sep 14:40
eb79c20

Choose a tag to compare

Merge #6086

6086: chalk 0.29.0 r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <[email protected]>

2020-09-21

21 Sep 10:57
3b52d31

Choose a tag to compare

Merge #6043

6043: Allow missing trait members assist without needing braces r=matklad a=M-J-Hooper

Assist to complete missing items when implementing a trait does not appear without impl def braces (see #5144 ).

The reason behind this was that this assist is based on `ast::AssocItemList` which only appears in the AST after the braces are added to the impl def.

Instead of relying on and replacing the item list, we now instead replace the entire `ast::Impl` and add the item list if its missing.

Co-authored-by: Matt Hooper <[email protected]>

2020-09-14

14 Sep 13:41
edd1529

Choose a tag to compare

Merge #5999

5999: Update crates r=kjeremy a=kjeremy



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

2020-09-07

07 Sep 15:10
0275b08

Choose a tag to compare

Merge #5940

5940: Implement "Replace `impl Trait` function argument with the named generic" assist. r=matklad a=alekseysidorov

Fixes #5085 

Co-authored-by: Aleksei Sidorov <[email protected]>

2020-08-31

31 Aug 11:14
ac4b134

Choose a tag to compare

Merge #5914

5914: Replace custom `xtask::not_bash::fs2` setup with fs_err crate r=matklad a=Veetaha



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

2020-08-24

24 Aug 11:21
31cb13d

Choose a tag to compare

Merge #4776

4776: Do a weekly minor publish to crates.io r=matklad a=pksunkara

This is the same system I set up on Chalk repo.

Every week it creates a new minor version, pushes it to github and then deploys it to crates.io.

Co-authored-by: Pavan Kumar Sunkara <[email protected]>

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]>