Skip to content

Commit 00a48d1

Browse files
committed
Changelog #119
1 parent 375603a commit 00a48d1

File tree

4 files changed

+92
-19
lines changed

4 files changed

+92
-19
lines changed

generated_assists.adoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn main() {
4444

4545
[discrete]
4646
=== `add_impl_default_members`
47-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_missing_impl_members.rs#L55[add_missing_impl_members.rs]
47+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_missing_impl_members.rs#L57[add_missing_impl_members.rs]
4848

4949
Adds scaffold for overriding default impl members.
5050

@@ -81,7 +81,7 @@ impl Trait for () {
8181

8282
[discrete]
8383
=== `add_impl_missing_members`
84-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_missing_impl_members.rs#L14[add_missing_impl_members.rs]
84+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_missing_impl_members.rs#L16[add_missing_impl_members.rs]
8585

8686
Adds scaffold for required impl members.
8787

@@ -236,7 +236,7 @@ fn main() {
236236

237237
[discrete]
238238
=== `auto_import`
239-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/auto_import.rs#L66[auto_import.rs]
239+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/auto_import.rs#L68[auto_import.rs]
240240

241241
If the name is unresolved, provides all possible imports for it.
242242

@@ -276,7 +276,7 @@ pub(crate) fn frobnicate() {}
276276

277277
[discrete]
278278
=== `convert_bool_then_to_if`
279-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_bool_then.rs#L133[convert_bool_then.rs]
279+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_bool_then.rs#L132[convert_bool_then.rs]
280280

281281
Converts a `bool::then` method call to an equivalent if expression.
282282

@@ -328,7 +328,7 @@ fn main() {
328328

329329
[discrete]
330330
=== `convert_if_to_bool_then`
331-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_bool_then.rs#L21[convert_bool_then.rs]
331+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_bool_then.rs#L20[convert_bool_then.rs]
332332

333333
Converts an if expression into a corresponding `bool::then` call.
334334

@@ -370,7 +370,7 @@ const _: i32 = 0b1010;
370370

371371
[discrete]
372372
=== `convert_into_to_from`
373-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_into_to_from.rs#L11[convert_into_to_from.rs]
373+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_into_to_from.rs#L8[convert_into_to_from.rs]
374374

375375
Converts an Into impl to an equivalent From impl.
376376

@@ -583,7 +583,7 @@ fn qux(bar: Bar, baz: Baz) {}
583583

584584
[discrete]
585585
=== `extract_function`
586-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_function.rs#L35[extract_function.rs]
586+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_function.rs#L33[extract_function.rs]
587587

588588
Extracts selected statements and comments into new function.
589589

@@ -648,7 +648,7 @@ fn bar(name: i32) -> i32 {
648648

649649
[discrete]
650650
=== `extract_struct_from_enum_variant`
651-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs#L28[extract_struct_from_enum_variant.rs]
651+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_struct_from_enum_variant.rs#L26[extract_struct_from_enum_variant.rs]
652652

653653
Extracts a struct from enum variant.
654654

@@ -1120,7 +1120,7 @@ impl Value {
11201120

11211121
[discrete]
11221122
=== `generate_from_impl_for_enum`
1123-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_from_impl_for_enum.rs#L7[generate_from_impl_for_enum.rs]
1123+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_from_impl_for_enum.rs#L6[generate_from_impl_for_enum.rs]
11241124

11251125
Adds a From impl for an enum variant with one tuple field.
11261126

@@ -1143,7 +1143,7 @@ impl From<u32> for A {
11431143

11441144
[discrete]
11451145
=== `generate_function`
1146-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_function.rs#L27[generate_function.rs]
1146+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_function.rs#L26[generate_function.rs]
11471147

11481148
Adds a stub function with a signature matching the function under the cursor.
11491149

@@ -1341,7 +1341,7 @@ impl Person {
13411341

13421342
[discrete]
13431343
=== `inline_call`
1344-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/inline_call.rs#L155[inline_call.rs]
1344+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/inline_call.rs#L156[inline_call.rs]
13451345

13461346
Inlines a function or method body creating a `let` statement per parameter unless the parameter
13471347
can be inlined. The parameter will be inlined either if it the supplied argument is a simple local
@@ -1367,7 +1367,7 @@ fn foo(name: Option<&str>) {
13671367

13681368
[discrete]
13691369
=== `inline_into_callers`
1370-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/inline_call.rs#L23[inline_call.rs]
1370+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/inline_call.rs#L24[inline_call.rs]
13711371

13721372
Inline a function or method body into all of its callers where possible, creating a `let` statement per parameter
13731373
unless the parameter can be inlined. The parameter will be inlined either if it the supplied argument is a simple local
@@ -2061,7 +2061,7 @@ fn main() {
20612061

20622062
[discrete]
20632063
=== `replace_derive_with_manual_impl`
2064-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs#L23[replace_derive_with_manual_impl.rs]
2064+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs#L21[replace_derive_with_manual_impl.rs]
20652065

20662066
Converts a `derive` impl into a manual one.
20672067

@@ -2439,7 +2439,7 @@ fn foo() {
24392439

24402440
[discrete]
24412441
=== `unwrap_result_return_type`
2442-
**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]
2442+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/unwrap_result_return_type.rs#L13[unwrap_result_return_type.rs]
24432443

24442444
Unwrap the function's return type.
24452445

@@ -2456,7 +2456,7 @@ fn foo() -> i32 { 42i32 }
24562456

24572457
[discrete]
24582458
=== `wrap_return_type_in_result`
2459-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/wrap_return_type_in_result.rs#L11[wrap_return_type_in_result.rs]
2459+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/wrap_return_type_in_result.rs#L14[wrap_return_type_in_result.rs]
24602460

24612461
Wrap the function's return type into Result.
24622462

generated_diagnostic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ This diagnostic is triggered if `match` block is missing one or more match arms.
7070

7171

7272
=== missing-ok-or-some-in-tail-expr
73-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_ok_or_some_in_tail_expr.rs#L8[missing_ok_or_some_in_tail_expr.rs]
73+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_ok_or_some_in_tail_expr.rs#L10[missing_ok_or_some_in_tail_expr.rs]
7474

7575
This diagnostic is triggered if a block that should return `Result` returns a value not wrapped in `Ok`,
7676
or if a block that should return `Option` returns a value not wrapped in `Some`.

generated_features.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ image::https://user-images.githubusercontent.com/48062697/113020672-b7c34f00-917
1010

1111

1212
=== Auto Import
13-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/auto_import.rs#L10[auto_import.rs]
13+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/auto_import.rs#L12[auto_import.rs]
1414

1515
Using the `auto-import` assist it is possible to insert missing imports for unresolved items.
1616
When inserting an import it will do so in a structured manner by keeping imports grouped,
@@ -312,7 +312,7 @@ image::https://user-images.githubusercontent.com/48062697/113020657-b560f500-917
312312

313313

314314
=== Highlight Related
315-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/highlight_related.rs#L38[highlight_related.rs]
315+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/highlight_related.rs#L37[highlight_related.rs]
316316

317317
Highlights constructs related to the thing under the cursor:
318318
- if on an identifier, highlights all references to that identifier in the current file
@@ -324,7 +324,7 @@ Note: `?` and `->` do not currently trigger this behavior in the VSCode editor.
324324

325325

326326
=== Hover
327-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/hover.rs#L83[hover.rs]
327+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/hover.rs#L84[hover.rs]
328328

329329
Shows additional information, like the type of an expression or the documentation for a definition when "focusing" code.
330330
Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
@@ -486,6 +486,10 @@ rust-analyzer can override kbd:[Enter] key to make it smarter:
486486

487487
This action needs to be assigned to shortcut explicitly.
488488

489+
Note that, depending on the other installed extensions, this feature can visibly slow down typing.
490+
Similarly, if rust-analyzer crashes or stops responding, `Enter` might not work.
491+
In that case, you can still press `Shift-Enter` to insert a newline.
492+
489493
VS Code::
490494

491495
Add the following to `keybindings.json`:
@@ -671,6 +675,7 @@ lifetime:: Emitted for lifetimes.
671675
parameter:: Emitted for non-self function parameters.
672676
property:: Emitted for struct and union fields.
673677
selfKeyword:: Emitted for the self function parameter and self path-specifier.
678+
selfTypeKeyword:: Emitted for the Self type parameter.
674679
toolModule:: Emitted for tool modules.
675680
typeParameter:: Emitted for type parameters.
676681
unresolvedReference:: Emitted for unresolved references, names that rust-analyzer can't find the definition of.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
= Changelog #119
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:5fae65dd28b450a437ebc800a410164c3af1d516[] +
6+
Release: release:2022-03-07[]
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+
== A Message from the Team
14+
15+
We of the rust-analyzer team never took the opportunity to introduce ourselves, but we want to make an exception because of the current events.
16+
17+
One of the early rust-analyzer contributors is currently in Kyiv, amidst falling missiles and artillery shells.
18+
19+
Our friend did not ask for this, did not ask to be liberated or saved by the Russian Army.
20+
Neither did the other countless Ukrainians who are today at risk.
21+
Their fault is having been born in a country which a bully decided shouldn't exist.
22+
23+
In Ukraine, Putin's army is committing war crimes, while those at home have no idea because independent journalism has been outlawed.
24+
25+
So please, speak up.
26+
If you have friends or family in Russia, call and tell them what millions of people.
27+
And consider https://mobile.twitter.com/Ukraine/status/1497294840110977024[making a donation] or going to a protest.
28+
29+
Thank you and _Slava Ukraini!_
30+
31+
== Heads-up
32+
33+
The latest Visual Studio Code version (1.65, released on March 3) has native support for inlay hints.
34+
We have been using a custom implementation of that, but would like to switch to the upstream one in pr:11445[], planned to be merged next week.
35+
This means that the next release will require VS Code 1.65.
36+
37+
Unfortunately, the upstream implementation brings some regressions.
38+
Specifically, the caret behaves differently when passing over the hint, and the styling is not necessarily better.
39+
In addition, Code only updates the hints about four times per second while typing, causing them to feel more sluggish.
40+
41+
== New Features
42+
43+
* pr:11620[] support locals with multiple declaration sites:
44+
+
45+
image::https://user-images.githubusercontent.com/3757771/156833306-6bdb97ae-1fb3-4fd0-9f7d-1783c54c23a5.gif[]
46+
* pr:11598[] parse destructuring assignments.
47+
48+
== Fixes
49+
50+
* pr:11609[] add another case to the syntax fixup code.
51+
* pr:11140[] preserve order of generic args.
52+
* pr:11616[] fix semantic highlighting breaking for lifetimes in macros.
53+
* pr:11595[] lower string literal values.
54+
* pr:11622[] show variadic args in hover function signature.
55+
* pr:11623[] add type variable table to `InferenceTableSnapshot`.
56+
* pr:11629[] fix macro-calls expanding to items in `if`/`while` conditions.
57+
* pr:11630[] recognize `Self` as a proper keyword.
58+
* pr:11613[] add `abort` to safe intrinsics list.
59+
60+
== Internal Improvements
61+
62+
* pr:11593[] build release binaries on Ubuntu 18.04.
63+
* pr:11610[] add currently failing test for #11242.
64+
* pr:11574[] slightly refactor `TextEdit`.
65+
* pr:11631[] refactor `syntax_highlighting`.
66+
* pr:11632[] bring back syntax highlighting in test data.
67+
* pr:11639[] re-arrange `ide_db` modules.
68+
* pr:11633[] automatically change text color in logo based on dark mode.

0 commit comments

Comments
 (0)