Skip to content

Commit f547657

Browse files
committed
Changelog #200
1 parent 3affd3f commit f547657

File tree

6 files changed

+83
-6
lines changed

6 files changed

+83
-6
lines changed

generated_assists.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,41 @@ fn some_function(x: i32) {
332332
```
333333

334334

335+
[discrete]
336+
=== `bool_to_enum`
337+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/bool_to_enum.rs#L25[bool_to_enum.rs]
338+
339+
This converts boolean local variables, fields, constants, and statics into a new
340+
enum with two variants `Bool::True` and `Bool::False`, as well as replacing
341+
all assignments with the variants and replacing all usages with `== Bool::True` or
342+
`== Bool::False`.
343+
344+
.Before
345+
```rust
346+
fn main() {
347+
let ┃bool = true;
348+
349+
if bool {
350+
println!("foo");
351+
}
352+
}
353+
```
354+
355+
.After
356+
```rust
357+
fn main() {
358+
#[derive(PartialEq, Eq)]
359+
enum Bool { True, False }
360+
361+
let bool = Bool::True;
362+
363+
if bool == Bool::True {
364+
println!("foo");
365+
}
366+
}
367+
```
368+
369+
335370
[discrete]
336371
=== `change_visibility`
337372
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/change_visibility.rs#L13[change_visibility.rs]

generated_config.adoc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ build procedural macros. The command is required to output json
5757
and should therefore include `--message-format=json` or a similar
5858
option.
5959

60+
If there are multiple linked projects/workspaces, this command is invoked for
61+
each of them, with the working directory being the workspace root
62+
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
63+
by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and
64+
`#rust-analyzer.cargo.buildScripts.invocationLocation#`.
65+
6066
By default, a cargo invocation will be constructed for the configured
6167
targets and features, with the following base command line:
6268

@@ -206,9 +212,11 @@ If you're changing this because you're using some tool wrapping
206212
Cargo, you might also want to change
207213
`#rust-analyzer.cargo.buildScripts.overrideCommand#`.
208214

209-
If there are multiple linked projects, this command is invoked for
210-
each of them, with the working directory being the project root
211-
(i.e., the folder containing the `Cargo.toml`).
215+
If there are multiple linked projects/workspaces, this command is invoked for
216+
each of them, with the working directory being the workspace root
217+
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
218+
by changing `#rust-analyzer.cargo.check.invocationStrategy#` and
219+
`#rust-analyzer.cargo.check.invocationLocation#`.
212220

213221
An example command would be:
214222

@@ -244,6 +252,11 @@ with `self` prefixed to them when inside a method.
244252
--
245253
Whether to add parenthesis and argument snippets when completing function.
246254
--
255+
[[rust-analyzer.completion.fullFunctionSignatures.enable]]rust-analyzer.completion.fullFunctionSignatures.enable (default: `false`)::
256+
+
257+
--
258+
Whether to show full function/method signatures in completion docs.
259+
--
247260
[[rust-analyzer.completion.limit]]rust-analyzer.completion.limit (default: `null`)::
248261
+
249262
--

generated_features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ Some features trigger on typing certain characters:
538538
- typing `=` between two expressions adds `;` when in statement position
539539
- typing `=` to turn an assignment into an equality comparison removes `;` when in expression position
540540
- typing `.` in a chain method call auto-indents
541-
- typing `{` in front of an expression inserts a closing `}` after the expression
541+
- typing `{` or `(` in front of an expression inserts a closing `}` or `)` after the expression
542542
- typing `{` in a use item adds a closing `}` in the right place
543543

544544
VS Code::

thisweek/_posts/2023-09-11-changelog-198.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ image::https://user-images.githubusercontent.com/308347/266912247-cd84cb65-0afc-
3333
* pr:15571[] remove allocation on MIR eval memory write.
3434
* pr:15567[] ignore enum variants in analysis stats of MIR bodies.
3535
* pr:15575[] intern projections in MIR place.
36-
* pr:15430[] de-unwrap `wrap_return_type_in_result`.
36+
* pr:15430[] de-`unwrap` `wrap_return_type_in_result`.
3737
* pr:15529[] do not send inlay hint refresh requests on file edits.
3838
* pr:15522[] resolve inlay hint data lazily.
3939
* pr:15586[], pr:15592[] shrink some stuff.

thisweek/_posts/2023-09-18-changelog-199.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Release: release:2023-09-18[] (`v0.3.1665`)
1717

1818
== Internal Improvements
1919

20-
* pr:15431[] de-unwrap `extract_function`.
20+
* pr:15431[] de-`unwrap` `extract_function`.
2121
* pr:15609[] remove most of the duplication from `Semantics{,Impl}` using `deref`.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
= Changelog #200
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:862a3004e958082d0e9cbdf1172c5fe2bab6cf2d[] +
7+
Release: release:2023-09-25[] (`v0.3.1673`)
8+
9+
== New Features
10+
11+
* pr:15582[] (first contribution) add option to show full signatures in completion docs.
12+
* pr:15484[] add "bool to enum" assist, to replace variables, fields, constants and statics with a new enum.
13+
14+
== Fixes
15+
16+
* pr:15621[] (first contribution) give `unmerge_use` a label explaining what it will affect.
17+
* pr:15651[] wrap inlined closures in parentheses.
18+
* pr:15635[] compute `inlayHint.textEdit` eagerly for VS Code.
19+
* pr:15587[] fix autoimport on traits already imported `as _`.
20+
21+
== Internal Improvements
22+
23+
* pr:15615[] (first contribution) fix some Clippy lints.
24+
* pr:15620[] (first contribution) change `exclude_labels` to `exclude_titles` in triagebot config.
25+
* pr:15632[] use `load_workspace_at` for `rust-analyzer scip`.
26+
* pr:15492[] extend `check.overrideCommand` and `buildScripts.overrideCommand` docs.
27+
* pr:15616[] use in-tree rustc dependencies with a `cfg` flag.
28+
* pr:15637[] update `chalk`.
29+
* pr:15432[], pr:15594[] de-`unwrap` `inline_call`, `add_missing_match_arms`, `convert_comment_block` and `desugar_doc_comment`.

0 commit comments

Comments
 (0)