Source: await_outside_of_async.rs
This diagnostic is triggered if the await
keyword is used outside of an async function or block
Source: break_outside_of_loop.rs
This diagnostic is triggered if the break
keyword is used outside of a loop.
Source: invalid_cast.rs
This diagnostic is triggered when casting to an unsized type
Source: expected_function.rs
This diagnostic is triggered if a call is made on something that is not callable.
Source: generic_args_prohibited.rs
This diagnostic is shown when generic arguments are provided for a type that does not accept generic arguments.
Source: inactive_code.rs
This diagnostic is shown for code with inactive #[cfg]
attributes.
Source: incoherent_impl.rs
This diagnostic is triggered if the targe type of an impl is from a foreign crate.
Source: incorrect_case.rs
This diagnostic is triggered if an item name doesn’t follow Rust naming convention.
Source: invalid_cast.rs
This diagnostic is triggered if the code contains an illegal cast
Source: invalid_derive_target.rs
This diagnostic is shown when the derive attribute is used on an item other than a struct
,
enum
or union
.
Source: malformed_derive.rs
This diagnostic is shown when the derive attribute has invalid input.
Source: mismatched_arg_count.rs
This diagnostic is triggered if a function is invoked with an incorrect amount of arguments.
Source: mismatched_arg_count.rs
This diagnostic is triggered if a function is invoked with an incorrect amount of arguments.
Source: missing_fields.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: missing_match_arms.rs
This diagnostic is triggered if match
block is missing one or more match arms.
Source: missing_unsafe.rs
This diagnostic is triggered if an operation marked as unsafe
is used outside of an unsafe
function or block.
Source: moved_out_of_ref.rs
This diagnostic is triggered on moving non copy things out of references.
Source: mutability_errors.rs
This diagnostic is triggered on mutating an immutable variable.
Source: no_such_field.rs
This diagnostic is triggered if created structure does not have field provided in record.
Source: non_exhaustive_let.rs
This diagnostic is triggered if a let
statement without an else
branch has a non-exhaustive
pattern.
Source: private_assoc_item.rs
This diagnostic is triggered if the referenced associated item is not visible from the current module.
Source: private_field.rs
This diagnostic is triggered if the accessed field is not visible from the current module.
Source: macro_error.rs
This diagnostic is shown for proc macros that has been specifically disabled via rust-analyzer.procMacro.ignored
.
Source: macro_error.rs
This diagnostic is shown for proc macros where proc macros have been disabled.
Source: remove_trailing_return.rs
This diagnostic is triggered when there is a redundant return
at the end of a function
or closure.
Source: remove_unnecessary_else.rs
This diagnostic is triggered when there is an else
block for an if
expression whose
then branch diverges (e.g. ends with a return
, continue
, break
e.t.c).
This diagnostic is triggered when .filter_map(..).next()
is used, rather than the more concise .find_map(..)
.
Source: trait_impl_incorrect_safety.rs
Diagnoses incorrect safety annotations of trait impls.
Source: trait_impl_missing_assoc_item.rs
Diagnoses missing trait items in a trait impl.
Source: trait_impl_orphan.rs
Only traits defined in the current crate can be implemented for arbitrary types
Diagnoses redundant trait items in a trait impl.
Source: type_mismatch.rs
This diagnostic is triggered when the type of an expression or pattern does not match the expected type.
Source: typed_hole.rs
This diagnostic is triggered when an underscore expression is used in an invalid position.
Source: undeclared_label.rs
Source: unimplemented_builtin_macro.rs
This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer
Source: 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.
Source: unreachable_label.rs
Source: unresolved_assoc_item.rs
This diagnostic is triggered if the referenced associated item does not exist.
Source: unresolved_extern_crate.rs
This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate.
Source: unresolved_field.rs
This diagnostic is triggered if a field does not exist on a given type.
Source: unresolved_ident.rs
This diagnostic is triggered if an expr-position ident is invalid.
Source: unresolved_import.rs
This diagnostic is triggered if rust-analyzer is unable to resolve a path in
a use
declaration.
Source: unresolved_macro_call.rs
This diagnostic is triggered if rust-analyzer is unable to resolve the path to a macro in a macro invocation.
Source: unresolved_method.rs
This diagnostic is triggered if a method does not exist on a given type.
Source: unresolved_module.rs
This diagnostic is triggered if rust-analyzer is unable to discover referred module.
Source: mutability_errors.rs
This diagnostic is triggered when a mutable variable isn’t actually mutated.
Source: unused_variables.rs
This diagnostic is triggered when a local variable is not used.