Skip to content

Commit

Permalink
Changelog #95
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Sep 20, 2021
1 parent 6642416 commit d8a632e
Show file tree
Hide file tree
Showing 5 changed files with 285 additions and 251 deletions.
51 changes: 50 additions & 1 deletion generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,34 @@ impl Point {
```


[discrete]
=== `convert_while_to_loop`
**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]

Replace a while with a loop.

.Before
```rust
fn main() {
┃while cond {
foo();
}
}
```

.After
```rust
fn main() {
loop {
if !cond {
break;
}
foo();
}
}
```


[discrete]
=== `destructure_tuple_binding`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/destructure_tuple_binding.rs#L14[destructure_tuple_binding.rs]
Expand Down Expand Up @@ -1248,6 +1276,27 @@ fn main() {
```


[discrete]
=== `line_to_block`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/convert_comment_block.rs#L9[convert_comment_block.rs]

Converts comments between block and single-line form.

.Before
```rust
// Multi-line┃
// comment
```

.After
```rust
/*
Multi-line
comment
*/
```


[discrete]
=== `make_raw_string`
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/raw_string.rs#L7[raw_string.rs]
Expand Down Expand Up @@ -1796,7 +1845,7 @@ fn compute() -> Option<i32> { None }

[discrete]
=== `replace_match_with_if_let`
**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]
**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]

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

Expand Down
84 changes: 21 additions & 63 deletions generated_diagnostic.adoc
Original file line number Diff line number Diff line change
@@ -1,56 +1,42 @@
//! Generated by `sourcegen_diagnostic_docs`, do not edit by hand.

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

== add-reference-here
=== add-reference-here
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/add_reference_here.rs#L8[add_reference_here.rs]

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


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

== break-outside-of-loop
=== break-outside-of-loop
**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]

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


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

== inactive-code
=== inactive-code
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/inactive_code.rs#L6[inactive_code.rs]

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


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

== incorrect-ident-case
=== incorrect-ident-case
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/incorrect_case.rs#L13[incorrect_case.rs]

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


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

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

This diagnostic is shown for macro expansion errors.


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

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

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


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

== missing-fields
=== missing-fields
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/missing_fields.rs#L11[missing_fields.rs]

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


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

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

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


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

== missing-ok-or-some-in-tail-expr
=== missing-ok-or-some-in-tail-expr
**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]

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


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

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

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


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

== no-such-field
=== no-such-field
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/no_such_field.rs#L11[no_such_field.rs]

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


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

== remove-this-semicolon
=== remove-this-semicolon
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/remove_this_semicolon.rs#L8[remove_this_semicolon.rs]

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


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

== replace-filter-map-next-with-find-map
=== replace-filter-map-next-with-find-map
**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]

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


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

== unimplemented-builtin-macro
=== unimplemented-builtin-macro
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unimplemented_builtin_macro.rs#L3[unimplemented_builtin_macro.rs]

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


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

== unlinked-file
=== unlinked-file
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unlinked_file.rs#L17[unlinked_file.rs]

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


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

== unnecessary-braces
=== unnecessary-braces
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/useless_braces.rs#L8[useless_braces.rs]

Diagnostic for unnecessary braces in `use` items.


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

== unresolved-extern-crate
=== unresolved-extern-crate
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_extern_crate.rs#L3[unresolved_extern_crate.rs]

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


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

== unresolved-import
=== unresolved-import
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_import.rs#L3[unresolved_import.rs]

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


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

== unresolved-macro-call
=== unresolved-macro-call
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_macro_call.rs#L6[unresolved_macro_call.rs]

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


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

== unresolved-module
=== unresolved-module
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_module.rs#L7[unresolved_module.rs]

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


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

== unresolved-proc-macro
=== unresolved-proc-macro
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_diagnostics/src/handlers/unresolved_proc_macro.rs#L3[unresolved_proc_macro.rs]

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

0 comments on commit d8a632e

Please sign in to comment.