Skip to content

Commit 80f41bf

Browse files
committed
Changelog #83
1 parent 0aa318e commit 80f41bf

File tree

6 files changed

+157
-44
lines changed

6 files changed

+157
-44
lines changed

generated_assists.adoc

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ const _: i32 = 0b1010;
244244

245245
[discrete]
246246
=== `convert_into_to_from`
247-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_into_to_from.rs#L9[convert_into_to_from.rs]
247+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_into_to_from.rs#L11[convert_into_to_from.rs]
248248

249249
Converts an Into impl to an equivalent From impl.
250250

@@ -282,7 +282,7 @@ Converts an Iterator::for_each function into a for loop.
282282
.Before
283283
```rust
284284
fn main() {
285-
let iter = SomeIter;
285+
let iter = iter::repeat((9, 2));
286286
iter.for_each┃(|(x, y)| {
287287
println!("x: {}, y: {}", x, y);
288288
});
@@ -292,7 +292,7 @@ fn main() {
292292
.After
293293
```rust
294294
fn main() {
295-
let iter = SomeIter;
295+
let iter = iter::repeat((9, 2));
296296
for (x, y) in iter {
297297
println!("x: {}, y: {}", x, y);
298298
}
@@ -617,7 +617,7 @@ fn foo<T: Copy + Clone>() { }
617617

618618
[discrete]
619619
=== `generate_default_from_enum_variant`
620-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_default_from_enum_variant.rs#L7[generate_default_from_enum_variant.rs]
620+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_default_from_enum_variant.rs#L6[generate_default_from_enum_variant.rs]
621621

622622
Adds a Default impl for an enum using a variant.
623623

@@ -648,7 +648,7 @@ impl Default for Version {
648648

649649
[discrete]
650650
=== `generate_default_from_new`
651-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_default_from_new.rs#L13[generate_default_from_new.rs]
651+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_default_from_new.rs#L14[generate_default_from_new.rs]
652652

653653
Generates default implementation from new method.
654654

@@ -1352,7 +1352,7 @@ fn handle(action: Action) {
13521352

13531353
[discrete]
13541354
=== `move_module_to_file`
1355-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_module_to_file.rs#L11[move_module_to_file.rs]
1355+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/move_module_to_file.rs#L14[move_module_to_file.rs]
13561356

13571357
Moves inline module's contents to a separate file.
13581358

@@ -1780,18 +1780,16 @@ Replaces `unwrap` with a `match` expression. Works for Result and Option.
17801780

17811781
.Before
17821782
```rust
1783-
enum Result<T, E> { Ok(T), Err(E) }
17841783
fn main() {
1785-
let x: Result<i32, i32> = Result::Ok(92);
1784+
let x: Result<i32, i32> = Ok(92);
17861785
let y = x.┃unwrap();
17871786
}
17881787
```
17891788

17901789
.After
17911790
```rust
1792-
enum Result<T, E> { Ok(T), Err(E) }
17931791
fn main() {
1794-
let x: Result<i32, i32> = Result::Ok(92);
1792+
let x: Result<i32, i32> = Ok(92);
17951793
let y = match x {
17961794
Ok(it) => it,
17971795
┃_ => unreachable!(),
@@ -1884,7 +1882,7 @@ fn foo() {
18841882

18851883
[discrete]
18861884
=== `wrap_return_type_in_result`
1887-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/wrap_return_type_in_result.rs#L10[wrap_return_type_in_result.rs]
1885+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/wrap_return_type_in_result.rs#L11[wrap_return_type_in_result.rs]
18881886

18891887
Wrap the function's return type into Result.
18901888

generated_config.adoc

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ The path structure for newly inserted paths to use.
1818
--
1919
Group inserted imports by the [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines.
2020
--
21+
[[rust-analyzer.assist.allowMergingIntoGlobImports]]rust-analyzer.assist.allowMergingIntoGlobImports (default: `true`)::
22+
+
23+
--
24+
Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
25+
--
2126
[[rust-analyzer.callInfo.full]]rust-analyzer.callInfo.full (default: `true`)::
2227
+
2328
--
@@ -34,6 +39,11 @@ Automatically refresh project info via `cargo metadata` on
3439
--
3540
Activate all available features (`--all-features`).
3641
--
42+
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
43+
+
44+
--
45+
Unsets `#[cfg(test)]` for the specified crates.
46+
--
3747
[[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
3848
+
3949
--
@@ -205,6 +215,16 @@ In some editors (e.g. vscode) semantic tokens override other highlighting gramma
205215
By disabling semantic tokens for strings, other grammars can be used to highlight
206216
their contents.
207217
--
218+
[[rust-analyzer.hover.documentation]]rust-analyzer.hover.documentation (default: `true`)::
219+
+
220+
--
221+
Whether to show documentation on hover.
222+
--
223+
[[rust-analyzer.hover.linksInHover]]rust-analyzer.hover.linksInHover (default: `true`)::
224+
+
225+
--
226+
Use markdown syntax for links in hover.
227+
--
208228
[[rust-analyzer.hoverActions.debug]]rust-analyzer.hoverActions.debug (default: `true`)::
209229
+
210230
--
@@ -240,11 +260,6 @@ Whether to show `References` action. Only applies when
240260
Whether to show `Run` action. Only applies when
241261
`#rust-analyzer.hoverActions.enable#` is set.
242262
--
243-
[[rust-analyzer.hoverActions.linksInHover]]rust-analyzer.hoverActions.linksInHover (default: `true`)::
244-
+
245-
--
246-
Use markdown syntax for links in hover.
247-
--
248263
[[rust-analyzer.inlayHints.chainingHints]]rust-analyzer.inlayHints.chainingHints (default: `true`)::
249264
+
250265
--

generated_diagnostic.adoc

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
//Generated file, do not edit by hand, see `xtask/src/codegen`
22
=== break-outside-of-loop
3-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/break_outside_of_loop.rs#L3[break_outside_of_loop.rs]
3+
**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]
44

55
This diagnostic is triggered if the `break` keyword is used outside of a loop.
66

77

88
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
99

1010
== inactive-code
11-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/inactive_code.rs#L9[inactive_code.rs]
11+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/inactive_code.rs#L6[inactive_code.rs]
1212

1313
This diagnostic is shown for code with inactive `#[cfg]` attributes.
1414

1515

1616
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
1717

1818
== incorrect-ident-case
19-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/incorrect_case.rs#L12[incorrect_case.rs]
19+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/incorrect_case.rs#L13[incorrect_case.rs]
2020

2121
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].
2222

2323

2424
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
2525

2626
== macro-error
27-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/macro_error.rs#L3[macro_error.rs]
27+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/macro_error.rs#L3[macro_error.rs]
2828

2929
This diagnostic is shown for macro expansion errors.
3030

3131

3232
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
3333

3434
== mismatched-arg-count
35-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/mismatched_arg_count.rs#L3[mismatched_arg_count.rs]
35+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs#L3[mismatched_arg_count.rs]
3636

3737
This diagnostic is triggered if a function is invoked with an incorrect amount of arguments.
3838

3939

4040
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
4141

4242
== missing-fields
43-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/missing_fields.rs#L11[missing_fields.rs]
43+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_fields.rs#L10[missing_fields.rs]
4444

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

@@ -56,15 +56,15 @@ let a = A { a: 10 };
5656
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
5757

5858
== missing-match-arm
59-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/missing_match_arms.rs#L5[missing_match_arms.rs]
59+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_match_arms.rs#L5[missing_match_arms.rs]
6060

6161
This diagnostic is triggered if `match` block is missing one or more match arms.
6262

6363

6464
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
6565

6666
== missing-ok-or-some-in-tail-expr
67-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/missing_ok_or_some_in_tail_expr.rs#L9[missing_ok_or_some_in_tail_expr.rs]
67+
**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]
6868

6969
This diagnostic is triggered if a block that should return `Result` returns a value not wrapped in `Ok`,
7070
or if a block that should return `Option` returns a value not wrapped in `Some`.
@@ -81,64 +81,72 @@ fn foo() -> Result<u8, ()> {
8181
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
8282

8383
== missing-unsafe
84-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/missing_unsafe.rs#L3[missing_unsafe.rs]
84+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_unsafe.rs#L3[missing_unsafe.rs]
8585

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

8888

8989
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
9090

9191
== no-such-field
92-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/no_such_field.rs#L14[no_such_field.rs]
92+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/no_such_field.rs#L11[no_such_field.rs]
9393

9494
This diagnostic is triggered if created structure does not have field provided in record.
9595

9696

9797
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
9898

9999
== remove-this-semicolon
100-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/remove_this_semicolon.rs#L11[remove_this_semicolon.rs]
100+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/remove_this_semicolon.rs#L8[remove_this_semicolon.rs]
101101

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

104104

105105
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
106106

107107
== replace-filter-map-next-with-find-map
108-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/replace_filter_map_next_with_find_map.rs#L14[replace_filter_map_next_with_find_map.rs]
108+
**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]
109109

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

112112

113113
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
114114

115115
== unimplemented-builtin-macro
116-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unimplemented_builtin_macro.rs#L6[unimplemented_builtin_macro.rs]
116+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unimplemented_builtin_macro.rs#L3[unimplemented_builtin_macro.rs]
117117

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

120120

121121
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
122122

123123
== unlinked-file
124-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unlinked_file.rs#L25[unlinked_file.rs]
124+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unlinked_file.rs#L17[unlinked_file.rs]
125125

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

129129

130+
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
131+
132+
== unnecessary-braces
133+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/useless_braces.rs#L8[useless_braces.rs]
134+
135+
Diagnostic for unnecessary braces in `use` items.
136+
137+
130138
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
131139

132140
== unresolved-extern-crate
133-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unresolved_extern_crate.rs#L3[unresolved_extern_crate.rs]
141+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_extern_crate.rs#L3[unresolved_extern_crate.rs]
134142

135143
This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
136144

137145

138146
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
139147

140148
== unresolved-import
141-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unresolved_import.rs#L3[unresolved_import.rs]
149+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_import.rs#L3[unresolved_import.rs]
142150

143151
This diagnostic is triggered if rust-analyzer is unable to resolve a path in
144152
a `use` declaration.
@@ -147,7 +155,7 @@ a `use` declaration.
147155
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
148156

149157
== unresolved-macro-call
150-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unresolved_macro_call.rs#L6[unresolved_macro_call.rs]
158+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_macro_call.rs#L6[unresolved_macro_call.rs]
151159

152160
This diagnostic is triggered if rust-analyzer is unable to resolve the path
153161
to a macro in a macro invocation.
@@ -156,15 +164,15 @@ to a macro in a macro invocation.
156164
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
157165

158166
== unresolved-module
159-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unresolved_module.rs#L8[unresolved_module.rs]
167+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_module.rs#L7[unresolved_module.rs]
160168

161169
This diagnostic is triggered if rust-analyzer is unable to discover referred module.
162170

163171

164172
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
165173

166174
== unresolved-proc-macro
167-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/diagnostics/unresolved_proc_macro.rs#L6[unresolved_proc_macro.rs]
175+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_proc_macro.rs#L3[unresolved_proc_macro.rs]
168176

169177
This diagnostic is shown when a procedural macro can not be found. This usually means that
170178
procedural macro support is simply disabled (and hence is only a weak hint instead of an error),

0 commit comments

Comments
 (0)