Skip to content

Commit b02e93d

Browse files
committed
Changelog #39
1 parent ae503fb commit b02e93d

File tree

3 files changed

+79
-6
lines changed

3 files changed

+79
-6
lines changed

generated_assists.adoc

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//Generated file, do not edit by hand, see `xtask/src/codegen`
12
[discrete]
23
=== `add_custom_impl`
34
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_custom_impl.rs#L14[add_custom_impl.rs]
@@ -65,7 +66,7 @@ fn main() {
6566

6667
[discrete]
6768
=== `add_impl_default_members`
68-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_missing_impl_members.rs#L64[add_missing_impl_members.rs]
69+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_missing_impl_members.rs#L63[add_missing_impl_members.rs]
6970

7071
Adds scaffold for overriding default impl members.
7172

@@ -95,8 +96,8 @@ trait Trait {
9596
impl Trait for () {
9697
Type X = ();
9798
fn foo(&self) {}
98-
$0fn bar(&self) {}
9999

100+
$0fn bar(&self) {}
100101
}
101102
```
102103

@@ -132,7 +133,6 @@ impl Trait<u32> for () {
132133
fn foo(&self) -> u32 {
133134
${0:todo!()}
134135
}
135-
136136
}
137137
```
138138

@@ -706,7 +706,7 @@ fn main() {
706706

707707
[discrete]
708708
=== `merge_imports`
709-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/merge_imports.rs#L14[merge_imports.rs]
709+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/merge_imports.rs#L15[merge_imports.rs]
710710

711711
Merges two imports with a common prefix.
712712

@@ -900,6 +900,31 @@ impl Walrus {
900900
```
901901

902902

903+
[discrete]
904+
=== `remove_unused_param`
905+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/remove_unused_param.rs#L13[remove_unused_param.rs]
906+
907+
Removes unused function parameter.
908+
909+
.Before
910+
```rust
911+
fn frobnicate(x: i32┃) {}
912+
913+
fn main() {
914+
frobnicate(92);
915+
}
916+
```
917+
918+
.After
919+
```rust
920+
fn frobnicate() {}
921+
922+
fn main() {
923+
frobnicate();
924+
}
925+
```
926+
927+
903928
[discrete]
904929
=== `reorder_fields`
905930
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/reorder_fields.rs#L10[reorder_fields.rs]

generated_features.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//Generated file, do not edit by hand, see `xtask/src/codegen`
12
=== Expand Macro Recursively
23
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/expand_macro.rs#L17[expand_macro.rs]
34

@@ -118,7 +119,7 @@ Join selected lines into one, smartly fixing up whitespace, trailing commas, and
118119

119120

120121
=== Magic Completions
121-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/completion.rs#L39[completion.rs]
122+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/completion.rs#L40[completion.rs]
122123

123124
In addition to usual reference completion, rust-analyzer provides some ✨magic✨
124125
completions as well:
@@ -302,7 +303,10 @@ replacement occurs. For example if our replacement template is `foo::Bar` and we
302303
code in the `foo` module, we'll insert just `Bar`.
303304

304305
Inherent method calls should generally be written in UFCS form. e.g. `foo::Bar::baz($s, $a)` will
305-
match `$s.baz($a)`, provided the method call `baz` resolves to the method `foo::Bar::baz`.
306+
match `$s.baz($a)`, provided the method call `baz` resolves to the method `foo::Bar::baz`. When a
307+
placeholder is the receiver of a method call in the search pattern (e.g. `$s.foo()`), but not in
308+
the replacement template (e.g. `bar($s)`), then *, & and &mut will be added as needed to mirror
309+
whatever autoderef and autoref was happening implicitly in the matched code.
306310

307311
The scope of the search / replace will be restricted to the current selection if any, otherwise
308312
it will apply to the whole workspace.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
= Changelog #39
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:e65d48d1fb3d4d91d9dc1148a7a836ff5c9a3c87[] +
6+
Release: release:2020-08-24[]
7+
8+
== Sponsors
9+
10+
**Become a sponsor:** https://opencollective.com/rust-analyzer/[opencollective.com/rust-analyzer]
11+
12+
== New Features
13+
14+
* pr:5821[] **Remove Unused Parameter** refactoring.
15+
+
16+
image::https://user-images.githubusercontent.com/1711539/91040554-bfcc7680-e60e-11ea-905f-548c4308246a.gif[]
17+
* pr:5695[] completion for unstable features.
18+
+
19+
image::https://user-images.githubusercontent.com/1711539/91040123-feadfc80-e60d-11ea-8f7c-3d0e76e59f5b.gif[]
20+
* pr:5643[] Add new consuming modifier to semantic syntax highlighting, apply consuming and mutable to methods.
21+
* pr:5758[] structural search replace now inserts *, & and &mut in the
22+
replacement to match any auto[de]ref in the matched code.
23+
* pr:5682[] allow disabling specific rust-analyzer diagnostics.
24+
+
25+
[source]
26+
----
27+
{
28+
"rust-analyzer.diagnostics.disabled": ["missing-structure-fields"],
29+
}
30+
----
31+
32+
== Fixes
33+
34+
* pr:5782[] make status notification confirm with JSON RPC specification.
35+
* pr:5787[] fix missing match arm false positive.
36+
* pr:5687[] correctly sort `DocumentSymbols` for Sublime Text.
37+
38+
== Internal Improvements
39+
40+
* pr:5835[] publish snapshot-testing library, `expect-test` to crates.io: https://lib.rs/crates/expect-test.
41+
* pr:5776[] fix eslint errors on .eslintrc.js and rollup.config.js.
42+
* pr:5790[] improve CI time by cleaning `traget` dir properly.
43+
* pr:5813[] use lld to link rust-analyzer on Windows.
44+
* pr:5824[] optimize unused parameters search.

0 commit comments

Comments
 (0)