Skip to content

Commit dee365b

Browse files
committed
Changelog #258
1 parent 2601620 commit dee365b

File tree

4 files changed

+81
-6
lines changed

4 files changed

+81
-6
lines changed

generated_assists.adoc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,44 @@ fn main() {
17931793
```
17941794

17951795

1796+
[discrete]
1797+
=== `generate_fn_type_alias_named`
1798+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_fn_type_alias.rs#L10[generate_fn_type_alias.rs]
1799+
1800+
Generate a type alias for the function with named parameters.
1801+
1802+
.Before
1803+
```rust
1804+
unsafe fn fo┃o(n: i32) -> i32 { 42i32 }
1805+
```
1806+
1807+
.After
1808+
```rust
1809+
type ${0:FooFn} = unsafe fn(n: i32) -> i32;
1810+
1811+
unsafe fn foo(n: i32) -> i32 { 42i32 }
1812+
```
1813+
1814+
1815+
[discrete]
1816+
=== `generate_fn_type_alias_unnamed`
1817+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_fn_type_alias.rs#L24[generate_fn_type_alias.rs]
1818+
1819+
Generate a type alias for the function with unnamed parameters.
1820+
1821+
.Before
1822+
```rust
1823+
unsafe fn fo┃o(n: i32) -> i32 { 42i32 }
1824+
```
1825+
1826+
.After
1827+
```rust
1828+
type ${0:FooFn} = unsafe fn(i32) -> i32;
1829+
1830+
unsafe fn foo(n: i32) -> i32 { 42i32 }
1831+
```
1832+
1833+
17961834
[discrete]
17971835
=== `generate_from_impl_for_enum`
17981836
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_from_impl_for_enum.rs#L8[generate_from_impl_for_enum.rs]

generated_diagnostic.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ This diagnostic is triggered if a function is invoked with an incorrect amount o
8686

8787

8888
=== missing-fields
89-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/missing_fields.rs#L20[missing_fields.rs]
89+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/missing_fields.rs#L19[missing_fields.rs]
9090

9191
This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
9292

generated_features.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,13 @@ in a unary function
382382
image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917a-11eb-8d70-3be3fd558cdd.png[]
383383

384384

385-
=== Interpret Function
386-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/interpret_function.rs#L6[interpret_function.rs]
385+
=== Interpret A Function, Static Or Const.
386+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/interpret.rs#L7[interpret.rs]
387387

388388
|===
389389
| Editor | Action Name
390390

391-
| VS Code | **rust-analyzer: Interpret Function**
391+
| VS Code | **rust-analyzer: Interpret**
392392
|===
393393

394394

@@ -411,7 +411,7 @@ image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917
411411

412412

413413
=== Magic Completions
414-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/lib.rs#L67[lib.rs]
414+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/lib.rs#L68[lib.rs]
415415

416416
In addition to usual reference completion, rust-analyzer provides some ✨magic✨
417417
completions as well:
@@ -496,7 +496,7 @@ image::https://user-images.githubusercontent.com/48062697/113065592-08559f00-91b
496496

497497

498498
=== Move Item
499-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/move_item.rs#L15[move_item.rs]
499+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/move_item.rs#L16[move_item.rs]
500500

501501
Move item under cursor or selection up and down.
502502

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
= Changelog #258
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:a341d598dc55f8c3077394df84ec8c14a502a787[] +
7+
Release: release:2024-11-04[] (`v0.3.2172`)
8+
9+
== New Features
10+
11+
* pr:18312[] (first contribution) include `let` statements in file outline.
12+
* pr:18420[] support `+#[cfg(true)]+` and `+#[cfg(false)]+`.
13+
* pr:18469[] show `static` values on hover.
14+
* pr:18470[] allow interpreting consts and statics with the Interpret command.
15+
* pr:18385[] add assist to generate a type alias for a function.
16+
17+
== Fixes
18+
19+
* pr:18436[] only render type layout info on definitions, not usages.
20+
* pr:18422[] properly resolve prelude paths in modules inside blocks.
21+
* pr:18413[] allow public re-exports of `extern crate` imports.
22+
* pr:18432[] honor diagnostic refresh capability.
23+
* pr:18382[] fix flyimport for aliased functions and modules.
24+
* pr:18446[] only parse `safe` as a contextual keyword in `extern` blocks.
25+
* pr:18453[] fix parsing of patterns with leading `|`.
26+
27+
== Internal Improvements
28+
29+
* pr:18304[] (first contribution) add developer setup instructions.
30+
* pr:18437[] (first contribution) publish `test-fixture` as `ra_ap_test_fixture`.
31+
* pr:18256[] (first contribution) start using `Option::is_none_or`.
32+
* pr:18074[] build source map for ``hir_def::TypeRef``s.
33+
* pr:18427[] clean up TypeRef lowering.
34+
* pr:18447[] avoid interior mutability in `TyLoweringContext`.
35+
* pr:18448[] move `child_by_source` from `hir-def` to `hir`.
36+
* pr:18421[] move `text-edit` into `ide-db`.
37+
* pr:18412[] stop producing `.gz` artifacts for Windows.

0 commit comments

Comments
 (0)