Skip to content

Commit 0a77d26

Browse files
committed
Changelog #95
1 parent 6642416 commit 0a77d26

File tree

5 files changed

+285
-251
lines changed

5 files changed

+285
-251
lines changed

generated_assists.adoc

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,34 @@ impl Point {
424424
```
425425

426426

427+
[discrete]
428+
=== `convert_while_to_loop`
429+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_while_to_loop.rs#L18[convert_while_to_loop.rs]
430+
431+
Replace a while with a loop.
432+
433+
.Before
434+
```rust
435+
fn main() {
436+
┃while cond {
437+
foo();
438+
}
439+
}
440+
```
441+
442+
.After
443+
```rust
444+
fn main() {
445+
loop {
446+
if !cond {
447+
break;
448+
}
449+
foo();
450+
}
451+
}
452+
```
453+
454+
427455
[discrete]
428456
=== `destructure_tuple_binding`
429457
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/destructure_tuple_binding.rs#L14[destructure_tuple_binding.rs]
@@ -1248,6 +1276,27 @@ fn main() {
12481276
```
12491277

12501278

1279+
[discrete]
1280+
=== `line_to_block`
1281+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_comment_block.rs#L9[convert_comment_block.rs]
1282+
1283+
Converts comments between block and single-line form.
1284+
1285+
.Before
1286+
```rust
1287+
// Multi-line┃
1288+
// comment
1289+
```
1290+
1291+
.After
1292+
```rust
1293+
/*
1294+
Multi-line
1295+
comment
1296+
*/
1297+
```
1298+
1299+
12511300
[discrete]
12521301
=== `make_raw_string`
12531302
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/raw_string.rs#L7[raw_string.rs]
@@ -1796,7 +1845,7 @@ fn compute() -> Option<i32> { None }
17961845

17971846
[discrete]
17981847
=== `replace_match_with_if_let`
1799-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_if_let_with_match.rs#L151[replace_if_let_with_match.rs]
1848+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_if_let_with_match.rs#L158[replace_if_let_with_match.rs]
18001849

18011850
Replaces a binary `match` with a wildcard pattern and no guards with an `if let` expression.
18021851

generated_diagnostic.adoc

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

3-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
4-
5-
== add-reference-here
3+
=== add-reference-here
64
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/add_reference_here.rs#L8[add_reference_here.rs]
75

86
This diagnostic is triggered when there's a missing referencing of expression.
97

108

11-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
12-
13-
== break-outside-of-loop
9+
=== break-outside-of-loop
1410
**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]
1511

1612
This diagnostic is triggered if the `break` keyword is used outside of a loop.
1713

1814

19-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
20-
21-
== inactive-code
15+
=== inactive-code
2216
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/inactive_code.rs#L6[inactive_code.rs]
2317

2418
This diagnostic is shown for code with inactive `#[cfg]` attributes.
2519

2620

27-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
28-
29-
== incorrect-ident-case
21+
=== incorrect-ident-case
3022
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/incorrect_case.rs#L13[incorrect_case.rs]
3123

3224
This diagnostic is triggered if an item name doesn't follow https://doc.rust-lang.org/1.0.0/style/style/naming/README.html[Rust naming convention].
3325

3426

35-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
36-
37-
== macro-error
27+
=== macro-error
3828
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/macro_error.rs#L3[macro_error.rs]
3929

4030
This diagnostic is shown for macro expansion errors.
4131

4232

43-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
44-
45-
== mismatched-arg-count
33+
=== mismatched-arg-count
4634
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs#L3[mismatched_arg_count.rs]
4735

4836
This diagnostic is triggered if a function is invoked with an incorrect amount of arguments.
4937

5038

51-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
52-
53-
== missing-fields
39+
=== missing-fields
5440
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_fields.rs#L11[missing_fields.rs]
5541

5642
This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
@@ -64,17 +50,13 @@ let a = A { a: 10 };
6450
```
6551

6652

67-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
68-
69-
== missing-match-arm
53+
=== missing-match-arm
7054
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_match_arms.rs#L5[missing_match_arms.rs]
7155

7256
This diagnostic is triggered if `match` block is missing one or more match arms.
7357

7458

75-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
76-
77-
== missing-ok-or-some-in-tail-expr
59+
=== missing-ok-or-some-in-tail-expr
7860
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_ok_or_some_in_tail_expr.rs#L8[missing_ok_or_some_in_tail_expr.rs]
7961

8062
This diagnostic is triggered if a block that should return `Result` returns a value not wrapped in `Ok`,
@@ -89,100 +71,76 @@ fn foo() -> Result<u8, ()> {
8971
```
9072

9173

92-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
93-
94-
== missing-unsafe
74+
=== missing-unsafe
9575
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_unsafe.rs#L3[missing_unsafe.rs]
9676

9777
This diagnostic is triggered if an operation marked as `unsafe` is used outside of an `unsafe` function or block.
9878

9979

100-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
101-
102-
== no-such-field
80+
=== no-such-field
10381
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/no_such_field.rs#L11[no_such_field.rs]
10482

10583
This diagnostic is triggered if created structure does not have field provided in record.
10684

10785

108-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
109-
110-
== remove-this-semicolon
86+
=== remove-this-semicolon
11187
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/remove_this_semicolon.rs#L8[remove_this_semicolon.rs]
11288

11389
This diagnostic is triggered when there's an erroneous `;` at the end of the block.
11490

11591

116-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
117-
118-
== replace-filter-map-next-with-find-map
92+
=== replace-filter-map-next-with-find-map
11993
**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]
12094

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

12397

124-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
125-
126-
== unimplemented-builtin-macro
98+
=== unimplemented-builtin-macro
12799
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unimplemented_builtin_macro.rs#L3[unimplemented_builtin_macro.rs]
128100

129101
This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
130102

131103

132-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
133-
134-
== unlinked-file
104+
=== unlinked-file
135105
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unlinked_file.rs#L17[unlinked_file.rs]
136106

137107
This diagnostic is shown for files that are not included in any crate, or files that are part of
138108
crates rust-analyzer failed to discover. The file will not have IDE features available.
139109

140110

141-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
142-
143-
== unnecessary-braces
111+
=== unnecessary-braces
144112
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/useless_braces.rs#L8[useless_braces.rs]
145113

146114
Diagnostic for unnecessary braces in `use` items.
147115

148116

149-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
150-
151-
== unresolved-extern-crate
117+
=== unresolved-extern-crate
152118
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_extern_crate.rs#L3[unresolved_extern_crate.rs]
153119

154120
This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
155121

156122

157-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
158-
159-
== unresolved-import
123+
=== unresolved-import
160124
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_import.rs#L3[unresolved_import.rs]
161125

162126
This diagnostic is triggered if rust-analyzer is unable to resolve a path in
163127
a `use` declaration.
164128

165129

166-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
167-
168-
== unresolved-macro-call
130+
=== unresolved-macro-call
169131
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_macro_call.rs#L6[unresolved_macro_call.rs]
170132

171133
This diagnostic is triggered if rust-analyzer is unable to resolve the path
172134
to a macro in a macro invocation.
173135

174136

175-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
176-
177-
== unresolved-module
137+
=== unresolved-module
178138
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_module.rs#L7[unresolved_module.rs]
179139

180140
This diagnostic is triggered if rust-analyzer is unable to discover referred module.
181141

182142

183-
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
184-
185-
== unresolved-proc-macro
143+
=== unresolved-proc-macro
186144
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_proc_macro.rs#L3[unresolved_proc_macro.rs]
187145

188146
This diagnostic is shown when a procedural macro can not be found. This usually means that

0 commit comments

Comments
 (0)