Skip to content

Commit 623fda5

Browse files
committed
Changelog #97
1 parent 705dcac commit 623fda5

File tree

5 files changed

+103
-7
lines changed

5 files changed

+103
-7
lines changed

generated_assists.adoc

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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#L112[convert_bool_then.rs]
279+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_bool_then.rs#L134[convert_bool_then.rs]
280280

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

@@ -656,7 +656,7 @@ struct S {
656656

657657
[discrete]
658658
=== `extract_variable`
659-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_variable.rs#L13[extract_variable.rs]
659+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_variable.rs#L14[extract_variable.rs]
660660

661661
Extracts subexpression into a variable.
662662

@@ -1527,6 +1527,26 @@ fn apply<T, U, F>(f: F, x: T) -> U where F: FnOnce(T) -> U {
15271527
```
15281528

15291529

1530+
[discrete]
1531+
=== `move_from_mod_rs`
1532+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_from_mod_rs.rs#L12[move_from_mod_rs.rs]
1533+
1534+
Moves xxx/mod.rs to xxx.rs.
1535+
1536+
.Before
1537+
```rust
1538+
//- /main.rs
1539+
mod a;
1540+
//- /a/mod.rs
1541+
┃fn t() {}┃
1542+
```
1543+
1544+
.After
1545+
```rust
1546+
fn t() {}
1547+
```
1548+
1549+
15301550
[discrete]
15311551
=== `move_guard_to_arm_body`
15321552
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_guard.rs#L8[move_guard.rs]
@@ -1581,7 +1601,7 @@ mod foo;
15811601

15821602
[discrete]
15831603
=== `move_to_mod_rs`
1584-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_to_mod_rs.rs#L38[move_to_mod_rs.rs]
1604+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_to_mod_rs.rs#L12[move_to_mod_rs.rs]
15851605

15861606
Moves xxx.rs to xxx/mod.rs.
15871607

generated_config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ List of warnings that should be displayed with info severity.
191191
The warnings will be indicated by a blue squiggly underline in code
192192
and a blue icon in the `Problems Panel`.
193193
--
194-
[[rust-analyzer.experimental.procAttrMacros]]rust-analyzer.experimental.procAttrMacros (default: `false`)::
194+
[[rust-analyzer.experimental.procAttrMacros]]rust-analyzer.experimental.procAttrMacros (default: `true`)::
195195
+
196196
--
197197
Expand attribute macros.

generated_diagnostic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ This diagnostic is triggered if created structure does not have field provided i
8484

8585

8686
=== remove-this-semicolon
87-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/remove_this_semicolon.rs#L8[remove_this_semicolon.rs]
87+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/remove_this_semicolon.rs#L10[remove_this_semicolon.rs]
8888

8989
This diagnostic is triggered when there's an erroneous `;` at the end of the block.
9090

generated_features.adoc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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#L33[highlight_related.rs]
315+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/highlight_related.rs#L36[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
@@ -333,7 +333,7 @@ image::https://user-images.githubusercontent.com/48062697/113020658-b5f98b80-917
333333

334334

335335
=== Inlay Hints
336-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L35[inlay_hints.rs]
336+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L36[inlay_hints.rs]
337337

338338
rust-analyzer shows additional information inline with the source code.
339339
Editors usually render this using read-only virtual text snippets interspersed with code.
@@ -498,6 +498,16 @@ Add the following to `keybindings.json`:
498498
}
499499
----
500500

501+
When using the Vim plugin:
502+
[source,json]
503+
----
504+
{
505+
"key": "Enter",
506+
"command": "rust-analyzer.onEnter",
507+
"when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust && vim.mode == 'Insert'"
508+
}
509+
----
510+
501511
image::https://user-images.githubusercontent.com/48062697/113065578-04c21800-91b1-11eb-82b8-22b8c481e645.gif[]
502512

503513

@@ -676,7 +686,9 @@ callable:: Emitted for locals whose types implements one of the `Fn*` traits.
676686
constant:: Emitted for consts.
677687
consuming:: Emitted for locals that are being consumed when use in a function call.
678688
controlFlow:: Emitted for control-flow related tokens, this includes the `?` operator.
689+
crateRoot:: Emitted for crate names, like `serde` and `crate`.
679690
declaration:: Emitted for names of definitions, like `foo` in `fn foo() {}`.
691+
defaultLibrary:: Emitted for items from built-in crates (std, core, alloc, test and proc_macro).
680692
documentation:: Emitted for documentation comments.
681693
injected:: Emitted for doc-string injected highlighting like rust source blocks in documentation.
682694
intraDocLink:: Emitted for intra doc links in doc-strings.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
= Changelog #97
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:4b7675fcc30d3e2c05eafc68a5724db66b58142c[] +
6+
Release: release:2021-10-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:10395[] (first contribution) add `pub(super)` keyword completion.
16+
* pr:10398[] (first contribution) set `defaultLibrary` semantic token on standard library items.
17+
* pr:10403[] add semantic token modifier for crate root.
18+
* pr:10362[] add assist to convert `a/mod.rs` into `a.rs`:
19+
+
20+
image::https://user-images.githubusercontent.com/13777628/134837717-074c23e9-1ca2-4207-b780-8443b2241272.gif[]
21+
* pr:10412[] highlight `asm!` as format string:
22+
+
23+
image::https://user-images.githubusercontent.com/1786438/135606261-a1cb6caf-0a7f-45f7-9dde-0275370b0889.png[]
24+
* pr:10441[] hide type inlay hints for constructors:
25+
+
26+
image::https://user-images.githubusercontent.com/3757771/135773135-caa363a2-ff40-42c2-baea-95809b85017f.png[]
27+
* pr:10181[] add basic LSIF support.
28+
* pr:10384[] add native `onEnterRules` for Code.
29+
* pr:10385[] make `extern crate test;` work.
30+
* pr:10366[] enable attribute proc macros by default.
31+
32+
33+
== Fixes
34+
35+
* pr:10416[] (first contribution) about `vscode-vim` in the `onEnter` docs.
36+
* pr:10374[] make `stringify!` insert/collapse whitespace when needed.
37+
* pr:10418[] add whitespace between lifetime and mut keyword in expand macro command.
38+
* pr:10377[] fix proc macro crash on nightly.
39+
* pr:10378[] implement most `proc_macro` span handling methods.
40+
* pr:10305[] move ``GenericParams``'s handling of `impl Trait` into `GenericParams::generic_params_query`.
41+
* pr:10382[] fix `inline_call` breaking `RecordExprField` shorthands.
42+
* pr:10373[], pr:10399[] fix `into_iterator` completion on `Vec<{unknown}>`.
43+
* pr:10389[] use the right `HirFileId` when expanding macros in function parameters.
44+
* pr:10397[], pr:10400[], pr:10413[] fix format string highlighting for `panic!`, `assert!`, `todo!`, `unimplemented!`, `concat!` and `unreachable!`.
45+
* pr:10402[] don't show flyimport completions in `use` renames.
46+
* pr:10411[] parenthesize expressions in `if_to_bool_then` assist where required.
47+
* pr:10422[] overwrite files when calling `patchelf`.
48+
* pr:10425[] only highlight the semicolon in "Remove semicolon" diagnostics.
49+
* pr:10430[] fix rename trying to edit the same range multiple times for certain macro inputs.
50+
* pr:10437[] fix `extract_variable` not working on macro calls.
51+
* pr:10436[] fix `await` insertion with `?` during `extract_function`.
52+
* pr:10439[] fix `insert_use` incorrectly merging glob imports.
53+
* pr:10442[] limit depth to 1 when searching for `Cargo.toml` to prevent activation in non-Rust projects.
54+
55+
56+
== Internal Improvements
57+
58+
* pr:10353[] (first contribution) remove `GenericParams::new`.
59+
* pr:10364[] rename `Dyn*` to `Any*` nodes.
60+
* pr:10406[] restructure syntax element highlighting into node and token branches.
61+
* pr:10414[] add some profiling calls to name resolution.
62+
* pr:10426[] use naming that matches intended use case.
63+
* pr:10429[] remove deprecated method.
64+
* pr:10431[] clean up MBE a bit.

0 commit comments

Comments
 (0)