Skip to content

Commit 64ccb47

Browse files
committed
Changelog #157
1 parent 4890ada commit 64ccb47

File tree

5 files changed

+66
-9
lines changed

5 files changed

+66
-9
lines changed

generated_assists.adoc

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ fn qux(bar: Bar, baz: Baz) {}
728728

729729
[discrete]
730730
=== `extract_function`
731-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L36[extract_function.rs]
731+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L38[extract_function.rs]
732732

733733
Extracts selected statements and comments into new function.
734734

@@ -1433,14 +1433,14 @@ impl Person {
14331433

14341434
[discrete]
14351435
=== `generate_impl`
1436-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_impl.rs#L5[generate_impl.rs]
1436+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_impl.rs#L8[generate_impl.rs]
14371437

14381438
Adds a new inherent impl for a type.
14391439

14401440
.Before
14411441
```rust
1442-
struct Ctx<T: Clone> {
1443-
data: T,
1442+
struct Ctx<T: Clone> {
1443+
data: T,
14441444
}
14451445
```
14461446

@@ -1544,6 +1544,31 @@ impl Person {
15441544
```
15451545

15461546

1547+
[discrete]
1548+
=== `generate_trait_impl`
1549+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_impl.rs#L56[generate_impl.rs]
1550+
1551+
Adds a new trait impl for a type.
1552+
1553+
.Before
1554+
```rust
1555+
struct ┃Ctx<T: Clone> {
1556+
data: T,
1557+
}
1558+
```
1559+
1560+
.After
1561+
```rust
1562+
struct Ctx<T: Clone> {
1563+
data: T,
1564+
}
1565+
1566+
impl<T: Clone> ┃ for Ctx<T> {
1567+
1568+
}
1569+
```
1570+
1571+
15471572
[discrete]
15481573
=== `inline_call`
15491574
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/inline_call.rs#L161[inline_call.rs]

generated_config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ cargo check --workspace --message-format=json --all-targets
190190
```
191191
.
192192
--
193-
[[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `[]`)::
193+
[[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `null`)::
194194
+
195195
--
196196
Check for specific targets. Defaults to `#rust-analyzer.cargo.target#` if empty.

generated_features.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,13 @@ image::https://user-images.githubusercontent.com/48062697/113020656-b560f500-917
264264

265265

266266
=== Go to Declaration
267-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_declaration.rs#L10[goto_declaration.rs]
267+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_declaration.rs#L13[goto_declaration.rs]
268268

269269
Navigates to the declaration of an identifier.
270270

271-
This is currently the same as `Go to Definition` with the exception of outline modules where it
272-
will navigate to the `mod name;` item declaration.
271+
This is the same as `Go to Definition` with the following exceptions:
272+
- outline modules will navigate to the `mod name;` item declaration
273+
- trait assoc items will navigate to the assoc item of the trait declaration opposed to the trait impl
273274

274275

275276
=== Go to Definition

thisweek/_posts/2022-11-21-changelog-156.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Release: release:2022-11-21[]
1212
image::https://user-images.githubusercontent.com/7951708/192122707-7a00606a-e581-4534-b9d5-b81c92694e8e.png["Screenshot showing an editor highlighting two warnings in code gated for different targets on one side and the `cargo check` output on the other side, with the same warnings. It also shows how to configure multiple targets as a `build.target` array in `.cargo/config.toml`."]
1313
* pr:13633[] allow viewing the full compiler diagnostic in a readonly textview:
1414
+
15-
image::https://user-images.githubusercontent.com/3757771/202780459-f751f65d-2b1b-4dc3-9685-100d65ebf6a0.gif["Screen case showing a compilation error in VS Code. The diagnostics pop-up has a `Click here for full compiler diagnostic` link which, when clicked, displays the `rustc` output in another tab, including the ASCII art showing the various spans of the error."]
15+
image::https://user-images.githubusercontent.com/3757771/202780459-f751f65d-2b1b-4dc3-9685-100d65ebf6a0.gif["Screen cast showing a compilation error in VS Code. The diagnostics pop-up has a `Click here for full compiler diagnostic` link which, when clicked, displays the `rustc` output in another tab, including the ASCII art showing the various spans of the error."]
1616
* pr:13629[] make "Remove ``dbg!()``" work on selections.
1717

1818
== Fixes
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
= Changelog #157
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:6d61be8e65ac0fd45eaf178e1f7a1ec6b582de1f[] +
6+
Release: release:2022-11-28[]
7+
8+
== New Features
9+
10+
* pr:13592[] (first contribution) add "Generate trait impl" assist.
11+
* pr:13638[] add hover hint to `..` in record patterns:
12+
+
13+
image::https://user-images.githubusercontent.com/51814158/202837115-f424cc26-c2d7-4027-8eea-eeb7749ad146.png["Screenshot showing a hover tooltip with the missing fields over a `..` in a record pattern"]
14+
15+
== Fixes
16+
17+
* pr:13576[] (first contribution) suppress "Implement default members" inside contained items.
18+
* pr:13661[] (first contribution) handle empty `checkOnSave.targets` values.
19+
* pr:13647[] (first contribution) fix tuple to named struct conversion inside macro calls.
20+
* pr:13652[] unquote strings in `compile_error!` expansions.
21+
* pr:13667[] handle sysroot config in detached-files workspaces.
22+
* pr:13670[] add `deriveHelper` to the `semanticTokenTypes` section of `package.json`.
23+
* pr:13611[] don't trigger completions after single colon.
24+
* pr:13671[] improve Go to declaration.
25+
* pr:13681[] check tail expressions more precisely in "Extract function".
26+
27+
== Internal Improvements
28+
29+
* pr:13678[] reduce the size of `HirFileId` from 8 to 4 bytes.
30+
* pr:13676[] mega-sync from `rust-lang/rust`.
31+
* pr:13669[] properly implement `Drop` for `JodGroupChild`.

0 commit comments

Comments
 (0)