Skip to content

Commit a24e253

Browse files
committed
Changelog #123
1 parent e766c45 commit a24e253

6 files changed

Lines changed: 92 additions & 13 deletions

File tree

generated_assists.adoc

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,9 +1020,9 @@ pub fn my_func(a: i32, b: i32) -> Result<(), std::io::Error> {
10201020

10211021
[discrete]
10221022
=== `generate_enum_as_method`
1023-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_projection_method.rs#L55[generate_enum_projection_method.rs]
1023+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_projection_method.rs#L56[generate_enum_projection_method.rs]
10241024

1025-
Generate an `as_` method for an enum variant.
1025+
Generate an `as_` method for this enum variant.
10261026

10271027
.Before
10281028
```rust
@@ -1053,9 +1053,9 @@ impl Value {
10531053

10541054
[discrete]
10551055
=== `generate_enum_is_method`
1056-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_is_method.rs#L10[generate_enum_is_method.rs]
1056+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_is_method.rs#L11[generate_enum_is_method.rs]
10571057

1058-
Generate an `is_` method for an enum variant.
1058+
Generate an `is_` method for this enum variant.
10591059

10601060
.Before
10611061
```rust
@@ -1088,9 +1088,9 @@ impl Version {
10881088

10891089
[discrete]
10901090
=== `generate_enum_try_into_method`
1091-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_projection_method.rs#L11[generate_enum_projection_method.rs]
1091+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_enum_projection_method.rs#L12[generate_enum_projection_method.rs]
10921092

1093-
Generate an `try_into_` method for an enum variant.
1093+
Generate a `try_into_` method for this enum variant.
10941094

10951095
.Before
10961096
```rust
@@ -1123,7 +1123,7 @@ impl Value {
11231123
=== `generate_from_impl_for_enum`
11241124
**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]
11251125

1126-
Adds a From impl for an enum variant with one tuple field.
1126+
Adds a From impl for this enum variant with one tuple field.
11271127

11281128
.Before
11291129
```rust
@@ -2445,6 +2445,26 @@ use std::fmt::Display;
24452445
```
24462446

24472447

2448+
[discrete]
2449+
=== `unnecessary_async`
2450+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/unnecessary_async.rs#L15[unnecessary_async.rs]
2451+
2452+
Removes the `async` mark from functions which have no `.await` in their body.
2453+
Looks for calls to the functions and removes the `.await` on the call site.
2454+
2455+
.Before
2456+
```rust
2457+
pub async f┃n foo() {}
2458+
pub async fn bar() { foo().await }
2459+
```
2460+
2461+
.After
2462+
```rust
2463+
pub fn foo() {}
2464+
pub async fn bar() { foo() }
2465+
```
2466+
2467+
24482468
[discrete]
24492469
=== `unwrap_block`
24502470
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/unwrap_block.rs#L11[unwrap_block.rs]

generated_config.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,3 +558,10 @@ Workspace symbol search scope.
558558
--
559559
Workspace symbol search kind.
560560
--
561+
[[rust-analyzer.workspace.symbol.search.limit]]rust-analyzer.workspace.symbol.search.limit (default: `128`)::
562+
+
563+
--
564+
Limits the number of items returned from a workspace symbol search (Defaults to 128).
565+
Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
566+
Other clients requires all results upfront and might require a higher limit.
567+
--

generated_diagnostic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ This diagnostic is triggered when `.filter_map(..).next()` is used, rather than
8282

8383

8484
=== type-mismatch
85-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/type_mismatch.rs#L14[type_mismatch.rs]
85+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/type_mismatch.rs#L11[type_mismatch.rs]
8686

8787
This diagnostic is triggered when the type of an expression does not match
8888
the expected type.

generated_features.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ In `VS Code` the configuration for this is `rust-analyzer.assist.importGranulari
5555
The style of imports in the same crate is configurable through the `importPrefix` setting.
5656
It has the following configurations:
5757

58-
- `by_crate`: This setting will force paths to be always absolute, starting with the `crate`
58+
- `crate`: This setting will force paths to be always absolute, starting with the `crate`
5959
prefix, unless the item is defined outside of the current crate.
60-
- `by_self`: This setting will force paths that are relative to the current module to always
60+
- `self`: This setting will force paths that are relative to the current module to always
6161
start with `self`. This will result in paths that always start with either `crate`, `self`,
6262
`super` or an extern crate identifier.
6363
- `plain`: This setting does not impose any restrictions in imports.
@@ -68,7 +68,7 @@ image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917
6868

6969

7070
=== Completion With Autoimport
71-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/flyimport.rs#L18[flyimport.rs]
71+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/flyimport.rs#L17[flyimport.rs]
7272

7373
When completing names in the current scope, proposes additional imports from other modules or crates,
7474
if they can be qualified in the scope, and their name contains all symbols from the completion input.
@@ -378,7 +378,7 @@ image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917
378378

379379

380380
=== Magic Completions
381-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/lib.rs#L37[lib.rs]
381+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/lib.rs#L39[lib.rs]
382382

383383
In addition to usual reference completion, rust-analyzer provides some ✨magic✨
384384
completions as well:

manual.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ nvim_lsp.rust_analyzer.setup({
310310
["rust-analyzer"] = {
311311
assist = {
312312
importGranularity = "module",
313-
importPrefix = "by_self",
313+
importPrefix = "self",
314314
},
315315
cargo = {
316316
loadOutDirsFromCheck = true
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
= Changelog #123
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:46d7ee68f26285db26b2640f2c07d6332380c756[] +
6+
Release: release:2022-04-04[]
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:11699[] (first contribution) add assist to remove unneeded ``async``s:
16+
+
17+
video::https://user-images.githubusercontent.com/308347/161477319-ba66afa6-c532-49e2-9c02-905c28c18d0b.mp4[options=loop]
18+
* pr:11879[] suggest inferred types in completion (add `:` and trigger it manually):
19+
+
20+
video::https://user-images.githubusercontent.com/308347/161476343-a8d70387-3d45-4653-8a4e-2a1aff23e017.mp4[options=loop]
21+
* pr:10802[] allow clients to configure the global workspace search limit.
22+
23+
== Fixes
24+
25+
* pr:11869[] (first contribution) allow tildes as code block fences:
26+
+
27+
image::https://user-images.githubusercontent.com/26626194/161207693-8e39997c-9ca6-4e69-8c65-e9b70899f7db.png[]
28+
* pr:11866[] (first contribution) avoid underflows in range conversion.
29+
* pr:11857[], pr:11886[] decrease relevance of postfix completions.
30+
* pr:11840[] fix another const generic panic.
31+
* pr:11842[] fix duplicate type mismatches with blocks.
32+
* pr:11844[] fix divergence detection for bare match arms.
33+
* pr:11852[] expand `asm!` to infinite loops to improve type inference.
34+
* pr:11863[] allow varargs in any param position.
35+
* pr:11870[] recover from missing type annotation.
36+
* pr:11878[] paper over GAT panic.
37+
* pr:11881[] don't rely on lang items to find primitive impls.
38+
* pr:11877[] don't add `self` when splitting glob imports.
39+
* pr:11887[] add missing fields diagnostic fix for patterns.
40+
* pr:11865[] select correct insert position for disabled group import.
41+
42+
== Internal Improvements
43+
44+
* pr:11849[] (first contribution) change `by_self` to `self` and `by_crate` to `crate` in docs.
45+
* pr:11867[], pr:11874[] (first contribution) create `Generate is, as, try_into` assist group.
46+
* pr:11861[] add `View file text` command to debug sync issues.
47+
* pr:11827[] enforce invariant that `Resolver` always contains a `ModuleScope`.
48+
* pr:11871[] move `rust.ungram` into `rust-analyzer/crates/syntax`.
49+
* pr:11872[] remove `PathResolution::AssocItem`.
50+
* pr:11875[] simplify completion.
51+
* pr:11882[] record outline child modules with missing backing file in def map.
52+
* pr:11890[] delete `FUNDING.yml`.

0 commit comments

Comments
 (0)