Skip to content

Commit 4b4490d

Browse files
committed
Changelog #53
1 parent 83b3f2f commit 4b4490d

File tree

4 files changed

+80
-9
lines changed

4 files changed

+80
-9
lines changed

generated_assists.adoc

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

165165
[discrete]
166166
=== `auto_import`
167-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/auto_import.rs#L64[auto_import.rs]
167+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/auto_import.rs#L67[auto_import.rs]
168168

169169
If the name is unresolved, provides all possible imports for it.
170170

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

281281
[discrete]
282282
=== `extract_struct_from_enum_variant`
283-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/extract_struct_from_enum_variant.rs#L18[extract_struct_from_enum_variant.rs]
283+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/extract_struct_from_enum_variant.rs#L19[extract_struct_from_enum_variant.rs]
284284

285285
Extracts a struct from enum variant.
286286

@@ -321,7 +321,7 @@ fn main() {
321321

322322
[discrete]
323323
=== `fill_match_arms`
324-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/fill_match_arms.rs#L14[fill_match_arms.rs]
324+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/fill_match_arms.rs#L15[fill_match_arms.rs]
325325

326326
Adds missing clauses to a `match` expression.
327327

@@ -461,7 +461,7 @@ struct Point {
461461

462462
[discrete]
463463
=== `generate_from_impl_for_enum`
464-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/generate_from_impl_for_enum.rs#L7[generate_from_impl_for_enum.rs]
464+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/generate_from_impl_for_enum.rs#L8[generate_from_impl_for_enum.rs]
465465

466466
Adds a From impl for an enum variant with one tuple field.
467467

@@ -566,7 +566,7 @@ impl<T: Clone> Ctx<T> {
566566

567567
[discrete]
568568
=== `ignore_test`
569-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/ignore_test.rs#L5[ignore_test.rs]
569+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/ignore_test.rs#L8[ignore_test.rs]
570570

571571
Adds `#[ignore]` attribute to the test.
572572

@@ -725,7 +725,7 @@ fn main() {
725725

726726
[discrete]
727727
=== `merge_imports`
728-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/merge_imports.rs#L15[merge_imports.rs]
728+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/merge_imports.rs#L13[merge_imports.rs]
729729

730730
Merges two imports with a common prefix.
731731

@@ -1089,7 +1089,7 @@ fn compute() -> Option<i32> { None }
10891089

10901090
[discrete]
10911091
=== `replace_qualified_name_with_use`
1092-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/replace_qualified_name_with_use.rs#L9[replace_qualified_name_with_use.rs]
1092+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/replace_qualified_name_with_use.rs#L7[replace_qualified_name_with_use.rs]
10931093

10941094
Adds a use statement for a given fully-qualified name.
10951095

generated_diagnostic.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ This diagnostic is shown for code with inactive `#[cfg]` attributes.
1717
This diagnostic is triggered if item name doesn't follow https://doc.rust-lang.org/1.0.0/style/style/naming/README.html[Rust naming convention].
1818

1919

20+
=== macro-error
21+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L167[diagnostics.rs]
22+
23+
This diagnostic is shown for macro expansion errors.
24+
25+
2026
=== mismatched-arg-count
2127
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L267[diagnostics.rs]
2228

@@ -103,3 +109,11 @@ This diagnostic is triggered if rust-analyzer is unable to discover imported mod
103109
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L18[diagnostics.rs]
104110

105111
This diagnostic is triggered if rust-analyzer is unable to discover referred module.
112+
113+
114+
=== unresolved-proc-macro
115+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L131[diagnostics.rs]
116+
117+
This diagnostic is shown when a procedural macro can not be found. This usually means that
118+
procedural macro support is simply disabled (and hence is only a weak hint instead of an error),
119+
but can also indicate project setup problems.

generated_features.adoc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//Generated file, do not edit by hand, see `xtask/src/codegen`
22
=== Auto Import
3-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/auto_import.rs#L9[auto_import.rs]
3+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/auto_import.rs#L12[auto_import.rs]
44

55
Using the `auto-import` assist it is possible to insert missing imports for unresolved items.
66
When inserting an import it will do so in a structured manner by keeping imports grouped,
@@ -116,7 +116,7 @@ The following postfix snippets are available:
116116

117117

118118
=== Go to Definition
119-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L18[goto_definition.rs]
119+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L14[goto_definition.rs]
120120

121121
Navigates to the definition of an identifier.
122122

@@ -215,6 +215,8 @@ There are postfix completions, which can be triggered by typing something like
215215
- `expr.while` -> `while expr {}` or `while let ... {}` for `Option` or `Result`
216216
- `expr.ref` -> `&expr`
217217
- `expr.refm` -> `&mut expr`
218+
- `expr.let` -> `let <|> = expr;`
219+
- `expr.letm` -> `let mut <|> = expr;`
218220
- `expr.not` -> `!expr`
219221
- `expr.dbg` -> `dbg!(expr)`
220222
- `expr.dbgr` -> `dbg!(&expr)`
@@ -239,6 +241,13 @@ mod tests {
239241
}
240242
```
241243

244+
And experimental completions, enabled with the `rust-analyzer.completion.enableExperimental` setting.
245+
This flag enables or disables:
246+
247+
- Auto import: additional completion options with automatic `use` import and options from all project importable items, matched for the input
248+
249+
Experimental completions might cause issues with performance and completion list look.
250+
242251

243252
=== Matching Brace
244253
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/matching_brace.rs#L7[matching_brace.rs]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
= Changelog #53
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:ac30710ada112984c9cf79c4af39ad666d000171[] +
6+
Release: release:2020-11-30[]
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:6645[] add diagnostics for unexpandable macros.
16+
+
17+
image::https://user-images.githubusercontent.com/1786438/100385784-f954b980-3023-11eb-9617-ac2eb0a0a9dc.png[]
18+
* pr:6666[] support "go to definition" for `self` parameter.
19+
+
20+
image::https://user-images.githubusercontent.com/1711539/100603959-2b0c9f80-3306-11eb-94fa-a7285ed17cf6.gif[]
21+
* pr:6664[] show type of `self` on hover.
22+
* pr:6606[] support `unsafe` extern block syntax.
23+
* pr:6618[], pr:6621[] type inference for tuple patterns with ellipsis.
24+
* pr:6624[] check structs for match exhaustiveness.
25+
* pr:6631[] gate autoimports behind experimental completions.
26+
* pr:6599[] add attribute highlight modifier to all tokens inside attributes.
27+
28+
== Fixes
29+
30+
* pr:6670[] allow renaming between self and first param with owned parameters.
31+
+
32+
image::https://user-images.githubusercontent.com/1711539/100604888-6f4c6f80-3307-11eb-85ac-773bda464ad5.gif[]
33+
* pr:6610[] **Ignore Test** assist now.
34+
* pr:6614[] improve performance of auto-import.
35+
* pr:6641[] `#[cfg]` diagnostics are more robust to code changes.
36+
* pr:6635[] complete struct in irrefutable let.
37+
* pr:6586[] better label for **Infer Function Return Type** assist.
38+
* pr:6669[] use the same default importing behavior in all editors.
39+
40+
== Internal Improvements
41+
42+
* pr:6613[] don't crash on invalid `DidChangeTextDocument` notifications.
43+
* pr:6637[] publish diagnostics on file open.
44+
* pr:6638[], pr:6639[], pr:6640[] cleanup macro expansion.
45+
* pr:6651[] add more profiling calls to completions.
46+
* pr:6652[] add more profiling calls to macro expansion.
47+
* pr:6656[] coalesce flycheck events.
48+
* pr:6650[] make completion and assists crates independent.

0 commit comments

Comments
 (0)