Skip to content

Commit 102e055

Browse files
committed
Changelog #119
1 parent 375603a commit 102e055

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-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.

0 commit comments

Comments
 (0)