Skip to content

Commit 9762de0

Browse files
committed
Changelog #176
1 parent 19ae9d3 commit 9762de0

File tree

4 files changed

+83
-4
lines changed

4 files changed

+83
-4
lines changed

generated_assists.adoc

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,35 @@ impl Point {
576576
```
577577

578578

579+
[discrete]
580+
=== `convert_nested_function_to_closure`
581+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_nested_function_to_closure.rs#L7[convert_nested_function_to_closure.rs]
582+
583+
Converts a function that is defined within the body of another function into a closure.
584+
585+
.Before
586+
```rust
587+
fn main() {
588+
fn fo┃o(label: &str, number: u64) {
589+
println!("{}: {}", label, number);
590+
}
591+
592+
foo("Bar", 100);
593+
}
594+
```
595+
596+
.After
597+
```rust
598+
fn main() {
599+
let foo = |label: &str, number: u64| {
600+
println!("{}: {}", label, number);
601+
};
602+
603+
foo("Bar", 100);
604+
}
605+
```
606+
607+
579608
[discrete]
580609
=== `convert_to_guarded_return`
581610
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_to_guarded_return.rs#L21[convert_to_guarded_return.rs]
@@ -1118,7 +1147,7 @@ impl Default for Example {
11181147

11191148
[discrete]
11201149
=== `generate_delegate_methods`
1121-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_delegate_methods.rs#L10[generate_delegate_methods.rs]
1150+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_delegate_methods.rs#L12[generate_delegate_methods.rs]
11221151

11231152
Generate delegate methods.
11241153

@@ -1848,7 +1877,7 @@ fn foo(bar: ┃impl Bar) {}
18481877

18491878
.After
18501879
```rust
1851-
fn foo<B: Bar>(bar: B) {}
1880+
fn foo<B: Bar>(bar: B) {}
18521881
```
18531882

18541883

generated_diagnostic.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ This diagnostic is triggered when the type of an expression or pattern does not
119119
the expected type.
120120

121121

122+
=== undeclared-label
123+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/undeclared_label.rs#L3[undeclared_label.rs]
124+
125+
126+
122127
=== unimplemented-builtin-macro
123128
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unimplemented_builtin_macro.rs#L3[unimplemented_builtin_macro.rs]
124129

@@ -138,6 +143,11 @@ crates rust-analyzer failed to discover. The file will not have IDE features ava
138143
Diagnostic for unnecessary braces in `use` items.
139144

140145

146+
=== unreachable-label
147+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unreachable_label.rs#L3[unreachable_label.rs]
148+
149+
150+
141151
=== unresolved-extern-crate
142152
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_extern_crate.rs#L3[unresolved_extern_crate.rs]
143153

generated_features.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b
617617

618618

619619
=== Semantic Syntax Highlighting
620-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L59[syntax_highlighting.rs]
620+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L62[syntax_highlighting.rs]
621621

622622
rust-analyzer highlights the code semantically.
623623
For example, `Bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait.
@@ -942,7 +942,7 @@ by overwriting the settings object mentioned above, the defaults are:
942942

943943

944944
=== View Crate Graph
945-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/view_crate_graph.rs#L10[view_crate_graph.rs]
945+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/view_crate_graph.rs#L9[view_crate_graph.rs]
946946

947947
Renders the currently loaded crate graph as an SVG graphic. Requires the `dot` tool, which
948948
is part of graphviz, to be installed.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
= Changelog #176
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:01120f1213ad928de7300a8acf9f41bed72d0422[] +
7+
Release: release:2023-04-10[] (`v0.3.1472`)
8+
9+
== New Features
10+
11+
* pr:14433[] (first contribution) add `#[doc(alias(..))]`-based completions.
12+
* pr:14512[] highlight escapes in `char` literals:
13+
+
14+
image::https://user-images.githubusercontent.com/30187863/230414581-b8c37355-6626-4745-9f2b-3d9d4f804b47.png["Screenshot showing highlighted char escapes"]
15+
* pr:14455[] add assist to convert nested functions to closures.
16+
* pr:14432[] drop support for non-syroot proc macro ABIs (proc macros no longer expand with Rust 1.63).
17+
18+
== Fixes
19+
20+
* pr:14486[] desugar `async fn` completely.
21+
* pr:14481[] fix VS Code project linking pop-up buttons being swapped.
22+
* pr:14482[] use the correct path accessor in the project linking pop-up.
23+
* pr:14483[] do autoderef in "Generate delegate methods".
24+
* pr:14493[] insert whitespace between text and attribute macros.
25+
* pr:14505[] fix block-local trait impl solving regressions.
26+
* pr:14520[] unify types in `infer_expr_coerce_never()`.
27+
28+
== Internal Improvements
29+
30+
* pr:14521[], pr:14526[], pr:14528[] add bounds for fields in derive macros.
31+
* pr:14436[] normalize associated types in paths in expressions.
32+
* pr:14490[] use an arena instead of a hash map in the crate graph.
33+
* pr:14442[] implement structured API for snippets.
34+
* pr:14509[] resolve labels in body lowering.
35+
* pr:14511[] always reborrow mutable reference receiver in methods.
36+
* pr:14517[] shuffle around some `hir-def` modules.
37+
* pr:14519[] don't recreate `Hygiene` unnecessarily.
38+
* pr:14518[] remove unnecessary ``Name``s from `FunctionData::params`.
39+
* pr:14525[] remove parameter names from function item tree.
40+
* pr:14524[] render function parameters in `hir-def` pretty printing.

0 commit comments

Comments
 (0)