Skip to content

Commit 93fedab

Browse files
committed
Changelog #51
1 parent 6fbfcc2 commit 93fedab

File tree

2 files changed

+86
-41
lines changed

2 files changed

+86
-41
lines changed

generated_assists.adoc

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
11
//Generated file, do not edit by hand, see `xtask/src/codegen`
2-
[discrete]
3-
=== `add_custom_impl`
4-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_custom_impl.rs#L19[add_custom_impl.rs]
5-
6-
Adds impl block for derived trait.
7-
8-
.Before
9-
```rust
10-
#[derive(Deb┃ug, Display)]
11-
struct S;
12-
```
13-
14-
.After
15-
```rust
16-
#[derive(Display)]
17-
struct S;
18-
19-
impl Debug for S {
20-
$0
21-
}
22-
```
23-
24-
252
[discrete]
263
=== `add_explicit_type`
274
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_explicit_type.rs#L9[add_explicit_type.rs]
@@ -208,23 +185,6 @@ fn main() {
208185
```
209186

210187

211-
[discrete]
212-
=== `change_return_type_to_result`
213-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/change_return_type_to_result.rs#L11[change_return_type_to_result.rs]
214-
215-
Change the function's return type to Result.
216-
217-
.Before
218-
```rust
219-
fn foo() -> i32┃ { 42i32 }
220-
```
221-
222-
.After
223-
```rust
224-
fn foo() -> Result<i32, ${0:_}> { Ok(42i32) }
225-
```
226-
227-
228188
[discrete]
229189
=== `change_visibility`
230190
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/change_visibility.rs#L11[change_visibility.rs]
@@ -320,7 +280,7 @@ fn qux(bar: Bar, baz: Baz) {}
320280

321281
[discrete]
322282
=== `extract_struct_from_enum_variant`
323-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/extract_struct_from_enum_variant.rs#L19[extract_struct_from_enum_variant.rs]
283+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/extract_struct_from_enum_variant.rs#L18[extract_struct_from_enum_variant.rs]
324284

325285
Extracts a struct from enum variant.
326286

@@ -1001,6 +961,31 @@ const test: Foo = Foo {foo: 1, bar: 0}
1001961
```
1002962

1003963

964+
[discrete]
965+
=== `replace_derive_with_manual_impl`
966+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/replace_derive_with_manual_impl.rs#L19[replace_derive_with_manual_impl.rs]
967+
968+
Converts a `derive` impl into a manual one.
969+
970+
.Before
971+
```rust
972+
#[derive(Deb┃ug, Display)]
973+
struct S;
974+
```
975+
976+
.After
977+
```rust
978+
#[derive(Display)]
979+
struct S;
980+
981+
impl Debug for S {
982+
fn fmt(&self, f: &mut Formatter) -> Result<()> {
983+
${0:todo!()}
984+
}
985+
}
986+
```
987+
988+
1004989
[discrete]
1005990
=== `replace_if_let_with_match`
1006991
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/replace_if_let_with_match.rs#L13[replace_if_let_with_match.rs]
@@ -1184,3 +1169,20 @@ fn foo() {
11841169
println!("foo");
11851170
}
11861171
```
1172+
1173+
1174+
[discrete]
1175+
=== `wrap_return_type_in_result`
1176+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/wrap_return_type_in_result.rs#L11[wrap_return_type_in_result.rs]
1177+
1178+
Wrap the function's return type into Result.
1179+
1180+
.Before
1181+
```rust
1182+
fn foo() -> i32┃ { 42i32 }
1183+
```
1184+
1185+
.After
1186+
```rust
1187+
fn foo() -> Result<i32, ${0:_}> { Ok(42i32) }
1188+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
= Changelog #51
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:e8c803937ce23a6cf74583ad03f9868869c7eea1[] +
6+
Release: release:2020-11-16[]
7+
8+
== Sponsors
9+
10+
**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or
11+
https://github.com/sponsors/rust-analyzer[GitHub Sponsors].
12+
13+
== New Features
14+
15+
* pr:6524[] add support for `#![feature(rustc_private)]`.
16+
Set `rust-analyzer.rustcSource` to point to a directory with compiler's sources if you develop tooling which uses compiler directly (clippy, rustfmt, etc).
17+
18+
* pr:6500[] add `.some` postfix template.
19+
+
20+
image::https://user-images.githubusercontent.com/1711539/99246914-612a2980-2806-11eb-9f54-1111cdfe08c6.gif[]
21+
* pr:6544[] add `.. Default::default()` completion.
22+
+
23+
image::https://user-images.githubusercontent.com/1711539/99248146-4e185900-2808-11eb-9cca-c85180ddb217.gif[]
24+
* pr:6472[] add `static` semantic tokens modifier to associated functions.
25+
* pr:6519[] **Open Cargo.toml** action opens a `Cargo.toml` file, relevant for the current `.rs` file.
26+
27+
== Fixes
28+
29+
* pr:6510[] fix panic in **Extract Struct From Enum Variant**.
30+
* pr:6514[] **Extract Struct From Enum Variant** updates references when extracting a record.
31+
* pr:6511[] highlight `.` as an operator.
32+
* pr:6516[] fixes to TextMate grammar.
33+
* pr:6534[] fix attachment of inner doc comments.
34+
* pr:6529[] do not insert imports before inner comments
35+
* pr:6513[] support qualified function calls in **Remove Unused Parameter** assist.
36+
37+
== Internal Improvements
38+
39+
* pr:6501[] make assists API more orthogonal.
40+
* pr:6465[] support multiple file edits in assists.
41+
* pr:6509[] support multiple file tests in assists.
42+
* pr:6521[] switch to upstream protocol for resolving code actions.
43+
* pr:6545[] simplify project loading.

0 commit comments

Comments
 (0)