Skip to content

Latest commit

 

History

History
145 lines (79 loc) · 6.23 KB

File metadata and controls

145 lines (79 loc) · 6.23 KB

break-outside-of-loop

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

inactive-code

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

incorrect-ident-case

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

invalid-derive-target

This diagnostic is shown when the derive attribute is used on an item other than a struct, enum or union.

macro-error

Source: macro_error.rs

This diagnostic is shown for macro expansion errors.

malformed-derive

This diagnostic is shown when the derive attribute has invalid input.

mismatched-arg-count

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

missing-fields

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-match-arm

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

missing-unsafe

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

no-such-field

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

replace-filter-map-next-with-find-map

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

type-mismatch

This diagnostic is triggered when the type of an expression does not match the expected type.

unimplemented-builtin-macro

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

unlinked-file

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.

unnecessary-braces

Diagnostic for unnecessary braces in use items.

unresolved-extern-crate

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

unresolved-import

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

unresolved-macro-call

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

unresolved-module

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

unresolved-proc-macro

This diagnostic is shown when a procedural macro can not be found. This usually means that procedural macro support is simply disabled (and hence is only a weak hint instead of an error), but can also indicate project setup problems.

If you are seeing a lot of "proc macro not expanded" warnings, you can add this option to the rust-analyzer.diagnostics.disabled list to prevent them from showing. Alternatively you can enable support for procedural macros (see rust-analyzer.procMacro.enable).