Source: diagnostics.rs
This diagnostic is triggered if break
keyword is used outside of a loop.
Source: diagnostics.rs
This diagnostic is shown for code with inactive #[cfg]
attributes.
Source: diagnostics.rs
This diagnostic is triggered if item name doesn’t follow Rust naming convention.
Source: diagnostics.rs
This diagnostic is triggered if function is invoked with an incorrect amount of arguments.
Source: diagnostics.rs
This diagnostic is triggered if match
block is missing one or more match arms.
Source: diagnostics.rs
This diagnostic is triggered if block that should return Result
returns a value not wrapped in Ok
.
Example:
fn foo() -> Result<u8, ()> {
10
}
Source: diagnostics.rs
This diagnostic is triggered if pattern lacks some fields that exist in the corresponding structure.
Example:
struct A { a: u8, b: u8 }
let a = A { a: 10, b: 20 };
if let A { a } = a {
// ...
}
Source: diagnostics.rs
This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
Example:
struct A { a: u8, b: u8 }
let a = A { a: 10 };
Source: diagnostics.rs
This diagnostic is triggered if operation marked as unsafe
is used outside of unsafe
function or block.
Source: diagnostics.rs
This diagnostic is triggered if created structure does not have field provided in record.
Source: diagnostics.rs
This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
Source: diagnostics.rs
This diagnostic is triggered if rust-analyzer is unable to discover imported module.
Source: diagnostics.rs
This diagnostic is triggered if rust-analyzer is unable to discover referred module.