Skip to content

Commit 248930a

Browse files
committed
Changelog #182
1 parent b10c785 commit 248930a

File tree

4 files changed

+70
-8
lines changed

4 files changed

+70
-8
lines changed

generated_assists.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn main() {
5252

5353
[discrete]
5454
=== `add_hash`
55-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/raw_string.rs#L88[raw_string.rs]
55+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/raw_string.rs#L89[raw_string.rs]
5656

5757
Adds a hash to a raw string literal.
5858

@@ -1976,7 +1976,7 @@ fn main() {
19761976

19771977
[discrete]
19781978
=== `make_usual_string`
1979-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/raw_string.rs#L46[raw_string.rs]
1979+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/raw_string.rs#L47[raw_string.rs]
19801980

19811981
Turns a raw string into a plain string.
19821982

@@ -2380,7 +2380,7 @@ fn main() {
23802380

23812381
[discrete]
23822382
=== `remove_hash`
2383-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/raw_string.rs#L116[raw_string.rs]
2383+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/raw_string.rs#L117[raw_string.rs]
23842384

23852385
Removes a hash from a raw string literal.
23862386

generated_diagnostic.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ This diagnostic is triggered if `match` block is missing one or more match arms.
8787
This diagnostic is triggered if an operation marked as `unsafe` is used outside of an `unsafe` function or block.
8888

8989

90+
=== moved-out-of-ref
91+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/moved_out_of_ref.rs#L4[moved_out_of_ref.rs]
92+
93+
This diagnostic is triggered on moving non copy things out of references.
94+
95+
9096
=== need-mut
9197
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/mutability_errors.rs#L7[mutability_errors.rs]
9298

generated_features.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,16 +319,18 @@ image::https://user-images.githubusercontent.com/48062697/113020657-b560f500-917
319319

320320

321321
=== Highlight Related
322-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/highlight_related.rs#L37[highlight_related.rs]
322+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/highlight_related.rs#L39[highlight_related.rs]
323323

324324
Highlights constructs related to the thing under the cursor:
325325

326326
. if on an identifier, highlights all references to that identifier in the current file
327+
.. additionally, if the identifier is a trait in a where clause, type parameter trait bound or use item, highlights all references to that trait's assoc items in the corresponding scope
327328
. if on an `async` or `await token, highlights all yield points for that async context
328329
. if on a `return` or `fn` keyword, `?` character or `->` return type arrow, highlights all exit points for that context
329330
. if on a `break`, `loop`, `while` or `for` token, highlights all break points for that loop or block context
331+
. if on a `move` or `|` token that belongs to a closure, highlights all captures of the closure.
330332

331-
Note: `?` and `->` do not currently trigger this behavior in the VSCode editor.
333+
Note: `?`, `|` and `->` do not currently trigger this behavior in the VSCode editor.
332334

333335

334336
=== Hover
@@ -341,7 +343,7 @@ image::https://user-images.githubusercontent.com/48062697/113020658-b5f98b80-917
341343

342344

343345
=== Inlay Hints
344-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L384[inlay_hints.rs]
346+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L392[inlay_hints.rs]
345347

346348
rust-analyzer shows additional information inline with the source code.
347349
Editors usually render this using read-only virtual text snippets interspersed with code.
@@ -627,7 +629,7 @@ image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b
627629

628630

629631
=== Semantic Syntax Highlighting
630-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L62[syntax_highlighting.rs]
632+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L65[syntax_highlighting.rs]
631633

632634
rust-analyzer highlights the code semantically.
633635
For example, `Bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait.
@@ -762,7 +764,7 @@ image::https://user-images.githubusercontent.com/5748995/229394139-2625beab-f4c9
762764

763765

764766
=== Show Syntax Tree
765-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_tree.rs#L7[syntax_tree.rs]
767+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_tree.rs#L9[syntax_tree.rs]
766768

767769
Shows the parse tree of the current file. It exists mostly for debugging
768770
rust-analyzer itself.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
= Changelog #182
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:7ac161ce77dfa31dc39337c2543a1d777e70c16e[] +
7+
Release: release:2023-05-22[] (`v0.3.1524`)
8+
9+
== New Features
10+
11+
* pr:14775[] add `#[doc(alias(..))]`-based method completions:
12+
+
13+
image::https://user-images.githubusercontent.com/108802164/237368212-e7c69bb9-3da6-4d8f-a09b-fece1bdd1c0e.png["Screenshot showing completion for method aliases"]
14+
* pr:14811[] render hover actions for closure captures and signature:
15+
+
16+
image::https://user-images.githubusercontent.com/308347/239809224-3df598fc-2203-41d8-8afa-3f0a0a360e00.png["Screenshot showing a closure hover with 'Go to' links for returned and captured types, and also its signature"]
17+
* pr:14812[] highlight used associated trait items when cursor is on trait import or trait bound:
18+
+
19+
image::https://user-images.githubusercontent.com/308347/239808933-634a3e29-d79b-4f20-8370-64944e7c9f72.png["Screenshot showing usages of a trait items]
20+
* pr:14789[] add `moved-out-of-ref` diagnostic:
21+
+
22+
image::https://user-images.githubusercontent.com/308347/239808632-c8362c50-10af-4463-a1f6-1428b901a02f.png["Screenshot showing a diagnostic when a local is moved out of a reference"]
23+
* pr:14845[] add layout info for enum variant and locals:
24+
+
25+
image::https://user-images.githubusercontent.com/308347/239808173-1f4a2da1-8137-4661-9407-1a3615d38a07.png["Screenshot showing the size of an enum variant on hover"]
26+
* pr:14837[] support C string literals.
27+
* pr:14787[] MIR episode 5, lower slice patterns and anonymous `const` blocks.
28+
29+
== Fixes
30+
31+
* pr:14848[] (first contribution) traverse `else` blocks of `let-else` in `preorder_expr`.
32+
* pr:14809[] support `#[macro_use(name, ...)]`.
33+
* pr:14824[] diagnose non-value `return` and `break` type mismatches.
34+
* pr:14825[] fix evaluation of negation for floating point types.
35+
* pr:14828[] process `macro_use` prelude in semantic scope resolver.
36+
* pr:14823[] only render discriminant hints for data-carrying enums with primitive `repr`.
37+
* pr:14822[] force-disable the `augmentsSyntaxTokens` capability on VS Code.
38+
* pr:14802[] fix layout for `hir_ty::Ty` and friends.
39+
* pr:14820[] expand `format_args!` with more details.
40+
* pr:14851[] handle match scrutinee in closure captures.
41+
* pr:14855[] consider block impls in `lookup_impl_assoc_item_for_trait_ref`.
42+
* pr:14863[] consider all tokens in macro calls when analyzing locals.
43+
44+
== Internal Improvements
45+
46+
* pr:14746[] parse unstable associated return type bounds.
47+
* pr:14794[], pr:14818[], pr:14835[] restructure `InlayHint`, no longer derive properties from its kind.
48+
* pr:14810[] inline handlers module.
49+
* pr:14834[] do less file parsing for symbol index generation.
50+
* pr:14836[] bump `rustc_lexer`.
51+
* pr:14843[] partially support panic message in `MirEvalError`.
52+
* pr:14847[] reduce MIR memory usage.
53+
* pr:14857[] shrink `ProcMacroExpander` from 8 to 4 bytes.
54+
* pr:14819[] fix division by zero in `analysis-stats`.

0 commit comments

Comments
 (0)