Skip to content

Commit 7270948

Browse files
committed
Changelog #122
1 parent 96f3365 commit 7270948

4 files changed

Lines changed: 54 additions & 30 deletions

File tree

generated_assists.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,6 @@ struct Ctx<T: Clone> {
13121312
}
13131313

13141314
impl<T: Clone> Ctx<T> {
1315-
#[must_use]
13161315
fn ┃new(data: T) -> Self { Self { data } }
13171316
}
13181317
```

generated_config.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Enables completions of private items and fields that are defined in the current
223223
--
224224
Whether to show native rust-analyzer diagnostics.
225225
--
226-
[[rust-analyzer.diagnostics.enableExperimental]]rust-analyzer.diagnostics.enableExperimental (default: `true`)::
226+
[[rust-analyzer.diagnostics.enableExperimental]]rust-analyzer.diagnostics.enableExperimental (default: `false`)::
227227
+
228228
--
229229
Whether to show experimental rust-analyzer diagnostics that might
@@ -383,7 +383,7 @@ Whether to show inlay type hints for return types of closures with blocks.
383383
--
384384
Whether to show inlay type hints for compiler inserted reborrows.
385385
--
386-
[[rust-analyzer.inlayHints.lifetimeElisionHints]]rust-analyzer.inlayHints.lifetimeElisionHints (default: `"never"`)::
386+
[[rust-analyzer.inlayHints.lifetimeElisionHints.enable]]rust-analyzer.inlayHints.lifetimeElisionHints.enable (default: `"never"`)::
387387
+
388388
--
389389
Whether to show inlay type hints for elided lifetimes in function signatures.

generated_diagnostic.adoc

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
//! Generated by `sourcegen_diagnostic_docs`, do not edit by hand.
22

3-
=== add-reference-here
4-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/add_reference_here.rs#L8[add_reference_here.rs]
5-
6-
This diagnostic is triggered when there's a missing referencing of expression.
7-
8-
93
=== break-outside-of-loop
104
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/break_outside_of_loop.rs#L3[break_outside_of_loop.rs]
115

@@ -69,21 +63,6 @@ let a = A { a: 10 };
6963
This diagnostic is triggered if `match` block is missing one or more match arms.
7064

7165

72-
=== missing-ok-or-some-in-tail-expr
73-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_ok_or_some_in_tail_expr.rs#L10[missing_ok_or_some_in_tail_expr.rs]
74-
75-
This diagnostic is triggered if a block that should return `Result` returns a value not wrapped in `Ok`,
76-
or if a block that should return `Option` returns a value not wrapped in `Some`.
77-
78-
Example:
79-
80-
```rust
81-
fn foo() -> Result<u8, ()> {
82-
10
83-
}
84-
```
85-
86-
8766
=== missing-unsafe
8867
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_unsafe.rs#L3[missing_unsafe.rs]
8968

@@ -96,18 +75,19 @@ This diagnostic is triggered if an operation marked as `unsafe` is used outside
9675
This diagnostic is triggered if created structure does not have field provided in record.
9776

9877

99-
=== remove-this-semicolon
100-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/remove_this_semicolon.rs#L10[remove_this_semicolon.rs]
101-
102-
This diagnostic is triggered when there's an erroneous `;` at the end of the block.
103-
104-
10578
=== replace-filter-map-next-with-find-map
10679
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/replace_filter_map_next_with_find_map.rs#L11[replace_filter_map_next_with_find_map.rs]
10780

10881
This diagnostic is triggered when `.filter_map(..).next()` is used, rather than the more concise `.find_map(..)`.
10982

11083

84+
=== type-mismatch
85+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/type_mismatch.rs#L14[type_mismatch.rs]
86+
87+
This diagnostic is triggered when the type of an expression does not match
88+
the expected type.
89+
90+
11191
=== unimplemented-builtin-macro
11292
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unimplemented_builtin_macro.rs#L3[unimplemented_builtin_macro.rs]
11393

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
= Changelog #122
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:bc08b8eff3f8e4da7c448d7b7f6461938c817a60[] +
6+
Release: release:2022-03-28[]
7+
8+
== Sponsors
9+
10+
**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or
11+
https://github.com/sponsors/rust-analyzer[GitHub Sponsors].
12+
13+
== New Features
14+
15+
* pr:11780[] add experimental type mismatch diagnostic (can be disabled using `rust-analyzer.diagnostics.disabled`: ["type-mismatch"]):
16+
+
17+
video::https://user-images.githubusercontent.com/308347/160331321-fc1b9b82-afc4-4764-85fb-4c4caee78b7b.mp4[options=loop]
18+
* pr:11809[] disable experimental diagnostics by default (can be re-enabled using `rust-analyzer.diagnostics.enableExperimental`).
19+
* pr:11772[] support constants in const eval.
20+
21+
== Fixes
22+
23+
* pr:11789[] rename lifetime elision hint configuration key to `rust-analyzer.inlayHints.lifetimeElisionHints.enable`.
24+
* pr:11805[] don't try to resolve methods on unknown types.
25+
* pr:11800[] fix `#[macro_use]` no longer importing non-`macro_rules!` macros.
26+
* pr:11806[] fix async block type inference using containing function return type.
27+
* pr:11797[] fix unwrap on a `None` value in proc macros built with Rust 1.57.0.
28+
* pr:11801[] avoid returning `None` from `Span::join` to fix some proc macros.
29+
* pr:11826[] stop emitting `#[must_use]` in `Generate new` assist.
30+
* pr:11782[] fix flyimport showing functions in pattern position.
31+
* pr:11785[] fix tuple- and record struct completions not working with existing braces.
32+
* pr:11786[] don't add wildcard pattern for `fill_match_arms` with local enums.
33+
* pr:11795[] correctly suggest auto importing traits from aliases.
34+
* pr:11791[] fix and improve signature help.
35+
* pr:11802[] add stubs to make proc macros work that use the `SourceFile` API.
36+
* pr:11825[] don't complete `Drop::drop` for qualified paths.
37+
* pr:11831[] disable ref_match for qualified paths as well.
38+
39+
== Internal Improvements
40+
41+
* pr:11793[] (first contribution) consolidate LSIF references into a single edge where possible.
42+
* pr:11788[] improve `find_path` and extern prelude handling.
43+
* pr:11833[] move mismatched arg count diagnostic to inference.
44+
* pr:11776[] replace `write!` with direct `Formatter` calls.
45+
* pr:11810[] rename the 1.47 proc macro ABI to 1.48.

0 commit comments

Comments
 (0)