Skip to content

Latest commit

 

History

History
105 lines (59 loc) · 3.42 KB

generated_diagnostic.adoc

File metadata and controls

105 lines (59 loc) · 3.42 KB

break-outside-of-loop

Source: diagnostics.rs

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

inactive-code

Source: diagnostics.rs

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

incorrect-ident-case

Source: diagnostics.rs

This diagnostic is triggered if item name doesn’t follow Rust naming convention.

mismatched-arg-count

Source: diagnostics.rs

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

missing-match-arm

Source: diagnostics.rs

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

missing-ok-in-tail-expr

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
}

missing-pat-fields

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 {
    // ...
}

missing-structure-fields

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 };

missing-unsafe

Source: diagnostics.rs

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

no-such-field

Source: diagnostics.rs

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

unresolved-extern-crate

Source: diagnostics.rs

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

unresolved-import

Source: diagnostics.rs

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

unresolved-module

Source: diagnostics.rs

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