Skip to content

Commit 7a39201

Browse files
committed
Changelog #171
1 parent 14bd613 commit 7a39201

File tree

5 files changed

+69
-7
lines changed

5 files changed

+69
-7
lines changed

generated_assists.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ impl From<u32> for A {
14311431

14321432
[discrete]
14331433
=== `generate_function`
1434-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_function.rs#L26[generate_function.rs]
1434+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_function.rs#L27[generate_function.rs]
14351435

14361436
Adds a stub function with a signature matching the function under the cursor.
14371437

@@ -2337,14 +2337,14 @@ Removes `dbg!()` macro call.
23372337
.Before
23382338
```rust
23392339
fn main() {
2340-
┃dbg!(92);
2340+
let x = ┃dbg!(42 * dbg!(4 + 2));┃
23412341
}
23422342
```
23432343

23442344
.After
23452345
```rust
23462346
fn main() {
2347-
92;
2347+
let x = 42 * (4 + 2);
23482348
}
23492349
```
23502350

generated_config.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,11 @@ Only applies to closures with blocks, same as `#rust-analyzer.inlayHints.closure
537537
--
538538
Whether to hide inlay type hints for constructors.
539539
--
540+
[[rust-analyzer.interpret.tests]]rust-analyzer.interpret.tests (default: `false`)::
541+
+
542+
--
543+
Enables the experimental support for interpreting tests.
544+
--
540545
[[rust-analyzer.joinLines.joinAssignments]]rust-analyzer.joinLines.joinAssignments (default: `true`)::
541546
+
542547
--

generated_diagnostic.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
This diagnostic is triggered if the `break` keyword is used outside of a loop.
77

88

9+
=== expected-function
10+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/expected_function.rs#L5[expected_function.rs]
11+
12+
This diagnostic is triggered if a call is made on something that is not callable.
13+
14+
915
=== inactive-code
1016
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/inactive_code.rs#L6[inactive_code.rs]
1117

@@ -95,9 +101,9 @@ This diagnostic is triggered when `.filter_map(..).next()` is used, rather than
95101

96102

97103
=== type-mismatch
98-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/type_mismatch.rs#L11[type_mismatch.rs]
104+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/type_mismatch.rs#L12[type_mismatch.rs]
99105

100-
This diagnostic is triggered when the type of an expression does not match
106+
This diagnostic is triggered when the type of an expression or pattern does not match
101107
the expected type.
102108

103109

@@ -126,6 +132,12 @@ Diagnostic for unnecessary braces in `use` items.
126132
This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
127133

128134

135+
=== unresolved-field
136+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_field.rs#L13[unresolved_field.rs]
137+
138+
This diagnostic is triggered if a field does not exist on a given type.
139+
140+
129141
=== unresolved-import
130142
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_import.rs#L3[unresolved_import.rs]
131143

@@ -140,6 +152,12 @@ This diagnostic is triggered if rust-analyzer is unable to resolve the path
140152
to a macro in a macro invocation.
141153

142154

155+
=== unresolved-method
156+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_method.rs#L13[unresolved_method.rs]
157+
158+
This diagnostic is triggered if a method does not exist on a given type.
159+
160+
143161
=== unresolved-module
144162
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_module.rs#L8[unresolved_module.rs]
145163

generated_features.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917
6868

6969

7070
=== Completion With Autoimport
71-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/completions/flyimport.rs#L23[flyimport.rs]
71+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/completions/flyimport.rs#L20[flyimport.rs]
7272

7373
When completing names in the current scope, proposes additional imports from other modules or crates,
7474
if they can be qualified in the scope, and their name contains all symbols from the completion input.
@@ -332,7 +332,7 @@ Note: `?` and `->` do not currently trigger this behavior in the VSCode editor.
332332

333333

334334
=== Hover
335-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/hover.rs#L81[hover.rs]
335+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/hover.rs#L82[hover.rs]
336336

337337
Shows additional information, like the type of an expression or the documentation for a definition when "focusing" code.
338338
Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
= Changelog #171
2+
:sectanchors:
3+
:experimental:
4+
:page-layout: post
5+
6+
Commit: commit:0a956ec9326eca09725d64d9f1b63896f93505d1[] +
7+
Release: release:2023-03-06[] (`v0.3.1426`)
8+
9+
== New Features
10+
11+
* pr:14240[] diagnose `break` with value in incorrect positions:
12+
+
13+
image::https://user-images.githubusercontent.com/3757771/222832086-1d3b2095-5cee-416f-ab59-47a6188aa6f7.png["Screenshot showing an error on `while true { break 0; }` and `for _ in [()] { break 0; }`"]
14+
* pr:14243[] diagnose unresolved field, method call and call expression:
15+
+
16+
image::https://user-images.githubusercontent.com/3757771/222831604-4e7886a6-d2f3-4672-835c-affeafb9fa8b.png["Screenshot showing errors on various unresolved fields and methods]
17+
* pr:14238[] allow "Generate function" to create functions in a different local crate.
18+
* pr:14222[], pr:14245[] implement pattern mismatch diagnostics, but keep them disabled.
19+
20+
== Fixes
21+
22+
* pr:14185[] (first contribution) fix running doctests for structs with lifetime parameters.
23+
* pr:14208[] (first contribution) fix path resolution in the presence of functions and structs with the same name.
24+
* pr:14223[] implement rendering of tuples in constant values.
25+
* pr:14225[] removing nested ``dbg!()``s in "Remove ``dbg!()``".
26+
* pr:14176[] fix associated item visibility in block-local impls.
27+
* pr:14239[] load the sysroot in all CLI commands.
28+
* pr:14247[] generate correct completion edits for missing macro arguments.
29+
* pr:14255[] bring back the hex display in const hover.
30+
31+
== Internal Improvements
32+
33+
* pr:14040[] introduce a MIR and use it for constant evaluation.
34+
* pr:14218[], pr:14234[] de-duplicate source roots that have overlapping include paths.
35+
* pr:14184[] handle trait alias definitions.
36+
* pr:14244[] report type metrics for patterns.
37+
* pr:14251[] set unit type expectation for expression statements without a semicolon.
38+
* pr:14252[] handle fields called as method calls as the fields they resolve to.
39+
* pr:14213[] add API to get `raw_ptr` type.

0 commit comments

Comments
 (0)