2020-10-20 14:29:31 -05:00
|
|
|
//Generated file, do not edit by hand, see `xtask/src/codegen`
|
|
|
|
=== break-outside-of-loop
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L219[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if `break` keyword is used outside of a loop.
|
|
|
|
|
|
|
|
|
2020-10-23 12:31:11 -05:00
|
|
|
=== inactive-code
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L98[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is shown for code with inactive `#[cfg]` attributes.
|
|
|
|
|
|
|
|
|
2020-10-20 14:29:31 -05:00
|
|
|
=== incorrect-ident-case
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L319[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if item name doesn't follow https://doc.rust-lang.org/1.0.0/style/style/naming/README.html[Rust naming convention].
|
|
|
|
|
|
|
|
|
|
|
|
=== mismatched-arg-count
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L267[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if function is invoked with an incorrect amount of arguments.
|
|
|
|
|
|
|
|
|
|
|
|
=== missing-match-arm
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L162[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if `match` block is missing one or more match arms.
|
|
|
|
|
|
|
|
|
|
|
|
=== missing-ok-in-tail-expr
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L187[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if block that should return `Result` returns a value not wrapped in `Ok`.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```rust
|
|
|
|
fn foo() -> Result<u8, ()> {
|
|
|
|
10
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
=== missing-pat-fields
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L113[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if pattern lacks some fields that exist in the corresponding structure.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```rust
|
|
|
|
struct A { a: u8, b: u8 }
|
|
|
|
|
|
|
|
let a = A { a: 10, b: 20 };
|
|
|
|
|
|
|
|
if let A { a } = a {
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
=== missing-structure-fields
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L66[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```rust
|
|
|
|
struct A { a: u8, b: u8 }
|
|
|
|
|
|
|
|
let a = A { a: 10 };
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
=== missing-unsafe
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L243[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if operation marked as `unsafe` is used outside of `unsafe` function or block.
|
|
|
|
|
|
|
|
|
|
|
|
=== no-such-field
|
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/diagnostics.rs#L39[diagnostics.rs]
|
|
|
|
|
|
|
|
This diagnostic is triggered if created structure does not have field provided in record.
|
|
|
|
|
|
|
|
|
|
|
|
=== unresolved-extern-crate
|
2020-10-23 12:27:04 -05:00
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L43[diagnostics.rs]
|
2020-10-20 14:29:31 -05:00
|
|
|
|
|
|
|
This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
|
|
|
|
|
|
|
|
|
|
|
|
=== unresolved-import
|
2020-10-23 12:27:04 -05:00
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L67[diagnostics.rs]
|
2020-10-20 14:29:31 -05:00
|
|
|
|
|
|
|
This diagnostic is triggered if rust-analyzer is unable to discover imported module.
|
|
|
|
|
|
|
|
|
|
|
|
=== unresolved-module
|
2020-10-23 12:27:04 -05:00
|
|
|
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_def/src/diagnostics.rs#L18[diagnostics.rs]
|
2020-10-20 14:29:31 -05:00
|
|
|
|
|
|
|
This diagnostic is triggered if rust-analyzer is unable to discover referred module.
|