Skip to content

Commit 2601620

Browse files
committed
Changelog #257
1 parent 14c100f commit 2601620

File tree

5 files changed

+129
-28
lines changed

5 files changed

+129
-28
lines changed

generated_assists.adoc

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3774,9 +3774,26 @@ fn foo() {
37743774
```
37753775

37763776

3777+
[discrete]
3778+
=== `unwrap_option_return_type`
3779+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/unwrap_return_type.rs#L13[unwrap_return_type.rs]
3780+
3781+
Unwrap the function's return type.
3782+
3783+
.Before
3784+
```rust
3785+
fn foo() -> Option<i32>┃ { Some(42i32) }
3786+
```
3787+
3788+
.After
3789+
```rust
3790+
fn foo() -> i32 { 42i32 }
3791+
```
3792+
3793+
37773794
[discrete]
37783795
=== `unwrap_result_return_type`
3779-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/unwrap_result_return_type.rs#L13[unwrap_result_return_type.rs]
3796+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/unwrap_return_type.rs#L26[unwrap_return_type.rs]
37803797

37813798
Unwrap the function's return type.
37823799

@@ -3813,9 +3830,26 @@ fn main() {
38133830
```
38143831

38153832

3833+
[discrete]
3834+
=== `wrap_return_type_in_option`
3835+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/wrap_return_type.rs#L17[wrap_return_type.rs]
3836+
3837+
Wrap the function's return type into Option.
3838+
3839+
.Before
3840+
```rust
3841+
fn foo() -> i32┃ { 42i32 }
3842+
```
3843+
3844+
.After
3845+
```rust
3846+
fn foo() -> Option<i32> { Some(42i32) }
3847+
```
3848+
3849+
38163850
[discrete]
38173851
=== `wrap_return_type_in_result`
3818-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/wrap_return_type_in_result.rs#L16[wrap_return_type_in_result.rs]
3852+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/wrap_return_type.rs#L30[wrap_return_type.rs]
38193853

38203854
Wrap the function's return type into Result.
38213855

generated_config.adoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ avoid checking unnecessary things.
9595
Default:
9696
----
9797
{
98-
"debug_assertions": null,
99-
"miri": null
98+
"miri": null,
99+
"debug_assertions": null
100100
}
101101
----
102102
List of cfg options to enable with the given values.
@@ -321,18 +321,10 @@ Enables completions of private items and fields that are defined in the current
321321
Default:
322322
----
323323
{
324-
"Arc::new": {
325-
"postfix": "arc",
326-
"body": "Arc::new(${receiver})",
327-
"requires": "std::sync::Arc",
328-
"description": "Put the expression into an `Arc`",
329-
"scope": "expr"
330-
},
331-
"Rc::new": {
332-
"postfix": "rc",
333-
"body": "Rc::new(${receiver})",
334-
"requires": "std::rc::Rc",
335-
"description": "Put the expression into an `Rc`",
324+
"Ok": {
325+
"postfix": "ok",
326+
"body": "Ok(${receiver})",
327+
"description": "Wrap the expression in a `Result::Ok`",
336328
"scope": "expr"
337329
},
338330
"Box::pin": {
@@ -342,10 +334,11 @@ Default:
342334
"description": "Put the expression into a pinned `Box`",
343335
"scope": "expr"
344336
},
345-
"Err": {
346-
"postfix": "err",
347-
"body": "Err(${receiver})",
348-
"description": "Wrap the expression in a `Result::Err`",
337+
"Arc::new": {
338+
"postfix": "arc",
339+
"body": "Arc::new(${receiver})",
340+
"requires": "std::sync::Arc",
341+
"description": "Put the expression into an `Arc`",
349342
"scope": "expr"
350343
},
351344
"Some": {
@@ -354,10 +347,17 @@ Default:
354347
"description": "Wrap the expression in an `Option::Some`",
355348
"scope": "expr"
356349
},
357-
"Ok": {
358-
"postfix": "ok",
359-
"body": "Ok(${receiver})",
360-
"description": "Wrap the expression in a `Result::Ok`",
350+
"Err": {
351+
"postfix": "err",
352+
"body": "Err(${receiver})",
353+
"description": "Wrap the expression in a `Result::Err`",
354+
"scope": "expr"
355+
},
356+
"Rc::new": {
357+
"postfix": "rc",
358+
"body": "Rc::new(${receiver})",
359+
"requires": "std::rc::Rc",
360+
"description": "Put the expression into an `Rc`",
361361
"scope": "expr"
362362
}
363363
}

generated_diagnostic.adoc

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This diagnostic is shown when the derive attribute is used on an item other than
5656

5757

5858
=== macro-def-error
59-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/macro_error.rs#L19[macro_error.rs]
59+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/macro_error.rs#L24[macro_error.rs]
6060

6161
This diagnostic is shown for macro expansion errors.
6262

@@ -118,7 +118,7 @@ This diagnostic is triggered on moving non copy things out of references.
118118

119119

120120
=== need-mut
121-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/mutability_errors.rs#L7[mutability_errors.rs]
121+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/mutability_errors.rs#L8[mutability_errors.rs]
122122

123123
This diagnostic is triggered on mutating an immutable variable.
124124

@@ -149,6 +149,18 @@ module.
149149
This diagnostic is triggered if the accessed field is not visible from the current module.
150150

151151

152+
=== proc-macro-disabled
153+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/macro_error.rs#L11[macro_error.rs]
154+
155+
This diagnostic is shown for proc macros that has been specifically disabled via `rust-analyzer.procMacro.ignored`.
156+
157+
158+
=== proc-macros-disabled
159+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/macro_error.rs#L7[macro_error.rs]
160+
161+
This diagnostic is shown for proc macros where proc macros have been disabled.
162+
163+
152164
=== remove-trailing-return
153165
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/remove_trailing_return.rs#L8[remove_trailing_return.rs]
154166

@@ -286,7 +298,7 @@ This diagnostic is triggered if rust-analyzer is unable to discover referred mod
286298

287299

288300
=== unused-mut
289-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/mutability_errors.rs#L51[mutability_errors.rs]
301+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/mutability_errors.rs#L62[mutability_errors.rs]
290302

291303
This diagnostic is triggered when a mutable variable isn't actually mutated.
292304

generated_features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ This is the same as `Go to Definition` with the following exceptions:
275275

276276

277277
=== Go to Definition
278-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L25[goto_definition.rs]
278+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L24[goto_definition.rs]
279279

280280
Navigates to the definition of an identifier.
281281

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
= Changelog #257
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:3b3a87fe9bd3f2a79942babc1d1e385b6805c384[] +
7+
Release: release:2024-10-28[] (`v0.3.2162`)
8+
9+
== A Note on Windows Artifacts
10+
11+
The next release will stop including `.gz` artifacts for Windows.
12+
These are harder to use than the `.zip` ones, which should be used instead.
13+
14+
== New Features
15+
16+
* pr:18294[] (first contribution) support `Option` in "Wrap/Unwrap return type".
17+
* pr:18362[], pr:18370[] (first contribution) support "Go to definition" on range operators and patterns.
18+
* pr:18359[] (first contribution) add option to not start the server on initialization.
19+
* pr:18264[] implement mixed-site hygiene.
20+
* pr:18404[], pr:18408[] implement pull model for diagnostics.
21+
* pr:18349[] render aliased type documentation when alias doesn't have any.
22+
* pr:18418[] split `macro-error` diagnostic so users can ignore parts of it.
23+
24+
== Fixes
25+
26+
* pr:18407[] (first contribution) fix formatting on welcome page.
27+
* pr:18376[] add text edits to more inlay hints.
28+
* pr:18361[] fix token downmapping failing for `include!` inputs.
29+
* pr:18254[] nail destructuring assignment down once and for all.
30+
* pr:18337[] don't show private items from modules nested in blocks in completions.
31+
* pr:18360[] improve completions for extern blocks.
32+
* pr:18371[] fix parsing of use bounds.
33+
* pr:18388[] Fix checking for `false` `labelDetailsSupport` value.
34+
* pr:18395[] add missing `target_has_atomic` and `target_has_atomic_load_store` `cfg` flags.
35+
* pr:18390[] prevent public re-exports of private items.
36+
* pr:18417[] correctly handle `#""` before the 2024 edition.
37+
* pr:18419[] put leading `|` in patterns under `OrPat`.
38+
* pr:18415[] mark "Remove ``dbg!``" as a quick fix for better prioritization.
39+
* pr:18366[] fix Markdown display in status bar message.
40+
* pr:18399[] respect config to disable native diagnostics.
41+
* pr:18386[] don't crash when local time offset is unavailable.
42+
43+
== Internal Improvements
44+
45+
* pr:18372[] (first contribution) switch CI from bors to merge queues.
46+
* pr:18373[] merge separate inlay hints targeting the same range.
47+
* pr:18391[] log original syntax on panic.
48+
* pr:18394[], pr:18396[] pretty-print `Config` in "Status" command.
49+
* pr:18402[] improve proc macro error message for failed build scripts.
50+
* pr:18410[] invert token iteration order in macro mapping.
51+
* pr:17954[] update `rustc-hash` to version 2.
52+
* pr:18392[] swap query call order in `file_item_tree_query` to help with caching issue.
53+
* pr:18409[] only construct a resolver during macro descension when needed.
54+
* pr:18368[] add test for LSIF macro-generated constants.
55+
* pr:18405[] update changelog generation for merge queues.

0 commit comments

Comments
 (0)