Skip to content

Commit 61b4740

Browse files
committed
Changelog #100
1 parent bcc5969 commit 61b4740

File tree

4 files changed

+114
-8
lines changed

4 files changed

+114
-8
lines changed

generated_assists.adoc

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ struct Point<'a> {
141141

142142
[discrete]
143143
=== `add_missing_match_arms`
144-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_missing_match_arms.rs#L16[add_missing_match_arms.rs]
144+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_missing_match_arms.rs#L15[add_missing_match_arms.rs]
145145

146146
Adds missing clauses to a `match` expression.
147147

@@ -612,6 +612,38 @@ fn ┃fun_name(n: i32) {
612612
```
613613

614614

615+
[discrete]
616+
=== `extract_module`
617+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_module.rs#L25[extract_module.rs]
618+
619+
Extracts a selected region as seperate module. All the references, visibility and imports are
620+
resolved.
621+
622+
.Before
623+
```rust
624+
┃fn foo(name: i32) -> i32 {
625+
name + 1
626+
}┃
627+
628+
fn bar(name: i32) -> i32 {
629+
name + 2
630+
}
631+
```
632+
633+
.After
634+
```rust
635+
mod modname {
636+
pub(crate) fn foo(name: i32) -> i32 {
637+
name + 1
638+
}
639+
}
640+
641+
fn bar(name: i32) -> i32 {
642+
name + 2
643+
}
644+
```
645+
646+
615647
[discrete]
616648
=== `extract_struct_from_enum_variant`
617649
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs#L29[extract_struct_from_enum_variant.rs]
@@ -1075,7 +1107,7 @@ impl From<u32> for A {
10751107

10761108
[discrete]
10771109
=== `generate_function`
1078-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_function.rs#L25[generate_function.rs]
1110+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_function.rs#L27[generate_function.rs]
10791111

10801112
Adds a stub function with a signature matching the function under the cursor.
10811113

@@ -1126,15 +1158,15 @@ struct Person {
11261158
impl Person {
11271159
/// Get a reference to the person's name.
11281160
fn ┃name(&self) -> &str {
1129-
self.name.as_str()
1161+
self.name.as_ref()
11301162
}
11311163
}
11321164
```
11331165

11341166

11351167
[discrete]
11361168
=== `generate_getter_mut`
1137-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_getter.rs#L36[generate_getter.rs]
1169+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_getter.rs#L51[generate_getter.rs]
11381170

11391171
Generate a mut getter method.
11401172

@@ -1753,6 +1785,37 @@ fn main() {
17531785
```
17541786

17551787

1788+
[discrete]
1789+
=== `qualify_method_call`
1790+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/qualify_method_call.rs#L13[qualify_method_call.rs]
1791+
1792+
Replaces the method call with a qualified function call.
1793+
1794+
.Before
1795+
```rust
1796+
struct Foo;
1797+
impl Foo {
1798+
fn foo(&self) {}
1799+
}
1800+
fn main() {
1801+
let foo = Foo;
1802+
foo.fo┃o();
1803+
}
1804+
```
1805+
1806+
.After
1807+
```rust
1808+
struct Foo;
1809+
impl Foo {
1810+
fn foo(&self) {}
1811+
}
1812+
fn main() {
1813+
let foo = Foo;
1814+
Foo::foo(&foo);
1815+
}
1816+
```
1817+
1818+
17561819
[discrete]
17571820
=== `qualify_path`
17581821
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/qualify_path.rs#L21[qualify_path.rs]
@@ -2300,7 +2363,7 @@ fn foo() {
23002363

23012364
[discrete]
23022365
=== `unwrap_result_return_type`
2303-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/unwrap_result_return_type.rs#L9[unwrap_result_return_type.rs]
2366+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/unwrap_result_return_type.rs#L10[unwrap_result_return_type.rs]
23042367

23052368
Unwrap the function's return type.
23062369

generated_features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917
358358

359359

360360
=== Join Lines
361-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/join_lines.rs#L22[join_lines.rs]
361+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/join_lines.rs#L20[join_lines.rs]
362362

363363
Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces.
364364

manual.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ On Unix, running the editor from a shell or changing the `.desktop` file to set
173173
`rust-analyzer` is available in `rustup`, but only in the nightly toolchain:
174174

175175
[source,bash]
176-
---
176+
----
177177
$ rustup +nightly component add rust-analyzer-preview
178-
---
178+
----
179+
180+
However, in contrast to `component add clippy` or `component add rustfmt`, this does not actually place a `rust-analyzer` binary in `~/.cargo/bin`, see https://github.com/rust-lang/rustup/issues/2411[this issue].
179181

180182
==== Arch Linux
181183

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
= Changelog #100
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:1f47693e02809c97db61b51247ae4e4d46744c61[] +
6+
Release: release:2021-10-25[]
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:10602[] (first contribution) add "Qualify method call" assist:
16+
+
17+
image::https://user-images.githubusercontent.com/308347/138670976-837b64aa-bf46-40bc-81c2-a9bdd62cdafe.gif[]
18+
* pr:9939[] add "Extract module" assist:
19+
+
20+
image::https://user-images.githubusercontent.com/308347/138671404-b740c4ff-0de3-426e-b9d7-134f02ab0e4e.gif[]
21+
* pr:10563[] make "Generate getter" assist use semantic info.
22+
* pr:10551[] pull in new `lsp-types` for Visual Studio 2022 compatibility.
23+
24+
== Fixes
25+
26+
* pr:10608[] (first contribution) amend the `rustup` installation instructions.
27+
* pr:10574[], pr:10578[] fix "Generate `PartialOrd` implementation" codegen.
28+
* pr:10568[] improve codegen for "Unwrap `Result` return type".
29+
* pr:10585[] resolve derive attributes even when shadowed.
30+
* pr:10587[] fix `add_missing_match_arm` panicking on failed upmapping.
31+
* pr:10589[] expand unused glob import into `{}`.
32+
* pr:10594[] generate and complete rustdoc lints.
33+
* pr:10597[] fix standard library doclinks not going to the correct page.
34+
* pr:10603[] don't resolve attributes to non-attribute macros.
35+
36+
== Internal Improvements
37+
38+
* pr:10607[], pr:10617[] migrate to the 2021 edition.
39+
* pr:10586[] make derive completions work on HIR, not names.
40+
* pr:10588[] parse const trait bounds.
41+
* pr:10387[] move `IdxRange` into `la-arena`.

0 commit comments

Comments
 (0)