| //! Generated by `cargo xtask codegen diagnostics-docs`, do not edit by hand. |
| |
| #### attribute-expansion-disabled |
| |
| Source: [macro_error.rs](crates/ide-diagnostics/src/handlers/macro_error.rs#7) |
| |
| |
| This diagnostic is shown for attribute proc macros when attribute expansions have been disabled. |
| |
| |
| |
| |
| #### await-outside-of-async |
| |
| Source: [await_outside_of_async.rs](crates/ide-diagnostics/src/handlers/await_outside_of_async.rs#3) |
| |
| |
| This diagnostic is triggered if the `await` keyword is used outside of an async function or block |
| |
| |
| |
| |
| #### break-outside-of-loop |
| |
| Source: [break_outside_of_loop.rs](crates/ide-diagnostics/src/handlers/break_outside_of_loop.rs#3) |
| |
| |
| This diagnostic is triggered if the `break` keyword is used outside of a loop. |
| |
| |
| |
| |
| #### cast-to-unsized |
| |
| Source: [invalid_cast.rs](crates/ide-diagnostics/src/handlers/invalid_cast.rs#106) |
| |
| |
| This diagnostic is triggered when casting to an unsized type |
| |
| |
| |
| |
| #### expected-function |
| |
| Source: [expected_function.rs](crates/ide-diagnostics/src/handlers/expected_function.rs#5) |
| |
| |
| This diagnostic is triggered if a call is made on something that is not callable. |
| |
| |
| |
| |
| #### generic-args-prohibited |
| |
| Source: [generic_args_prohibited.rs](crates/ide-diagnostics/src/handlers/generic_args_prohibited.rs#10) |
| |
| |
| This diagnostic is shown when generic arguments are provided for a type that does not accept |
| generic arguments. |
| |
| |
| |
| |
| #### inactive-code |
| |
| Source: [inactive_code.rs](crates/ide-diagnostics/src/handlers/inactive_code.rs#6) |
| |
| |
| This diagnostic is shown for code with inactive `#[cfg]` attributes. |
| |
| |
| |
| |
| #### incoherent-impl |
| |
| Source: [incoherent_impl.rs](crates/ide-diagnostics/src/handlers/incoherent_impl.rs#6) |
| |
| |
| This diagnostic is triggered if the targe type of an impl is from a foreign crate. |
| |
| |
| |
| |
| #### incorrect-ident-case |
| |
| Source: [incorrect_case.rs](crates/ide-diagnostics/src/handlers/incorrect_case.rs#13) |
| |
| |
| This diagnostic is triggered if an item name doesn't follow [Rust naming convention](https://doc.rust-lang.org/1.0.0/style/style/naming/README.html). |
| |
| |
| |
| |
| #### invalid-cast |
| |
| Source: [invalid_cast.rs](crates/ide-diagnostics/src/handlers/invalid_cast.rs#18) |
| |
| |
| This diagnostic is triggered if the code contains an illegal cast |
| |
| |
| |
| |
| #### invalid-derive-target |
| |
| Source: [invalid_derive_target.rs](crates/ide-diagnostics/src/handlers/invalid_derive_target.rs#3) |
| |
| |
| This diagnostic is shown when the derive attribute is used on an item other than a `struct`, |
| `enum` or `union`. |
| |
| |
| |
| |
| #### macro-def-error |
| |
| Source: [macro_error.rs](crates/ide-diagnostics/src/handlers/macro_error.rs#24) |
| |
| |
| This diagnostic is shown for macro expansion errors. |
| |
| |
| |
| |
| #### macro-error |
| |
| Source: [macro_error.rs](crates/ide-diagnostics/src/handlers/macro_error.rs#3) |
| |
| |
| This diagnostic is shown for macro expansion errors. |
| |
| |
| |
| |
| #### malformed-derive |
| |
| Source: [malformed_derive.rs](crates/ide-diagnostics/src/handlers/malformed_derive.rs#3) |
| |
| |
| This diagnostic is shown when the derive attribute has invalid input. |
| |
| |
| |
| |
| #### mismatched-arg-count |
| |
| Source: [mismatched_arg_count.rs](crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs#31) |
| |
| |
| This diagnostic is triggered if a function is invoked with an incorrect amount of arguments. |
| |
| |
| |
| |
| #### mismatched-tuple-struct-pat-arg-count |
| |
| Source: [mismatched_arg_count.rs](crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs#11) |
| |
| |
| This diagnostic is triggered if a function is invoked with an incorrect amount of arguments. |
| |
| |
| |
| |
| #### missing-fields |
| |
| Source: [missing_fields.rs](crates/ide-diagnostics/src/handlers/missing_fields.rs#19) |
| |
| |
| 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-match-arm |
| |
| Source: [missing_match_arms.rs](crates/ide-diagnostics/src/handlers/missing_match_arms.rs#3) |
| |
| |
| This diagnostic is triggered if `match` block is missing one or more match arms. |
| |
| |
| |
| |
| #### missing-unsafe |
| |
| Source: [missing_unsafe.rs](crates/ide-diagnostics/src/handlers/missing_unsafe.rs#10) |
| |
| |
| This diagnostic is triggered if an operation marked as `unsafe` is used outside of an `unsafe` function or block. |
| |
| |
| |
| |
| #### moved-out-of-ref |
| |
| Source: [moved_out_of_ref.rs](crates/ide-diagnostics/src/handlers/moved_out_of_ref.rs#4) |
| |
| |
| This diagnostic is triggered on moving non copy things out of references. |
| |
| |
| |
| |
| #### need-mut |
| |
| Source: [mutability_errors.rs](crates/ide-diagnostics/src/handlers/mutability_errors.rs#8) |
| |
| |
| This diagnostic is triggered on mutating an immutable variable. |
| |
| |
| |
| |
| #### no-such-field |
| |
| Source: [no_such_field.rs](crates/ide-diagnostics/src/handlers/no_such_field.rs#12) |
| |
| |
| This diagnostic is triggered if created structure does not have field provided in record. |
| |
| |
| |
| |
| #### non-exhaustive-let |
| |
| Source: [non_exhaustive_let.rs](crates/ide-diagnostics/src/handlers/non_exhaustive_let.rs#3) |
| |
| |
| This diagnostic is triggered if a `let` statement without an `else` branch has a non-exhaustive |
| pattern. |
| |
| |
| |
| |
| #### private-assoc-item |
| |
| Source: [private_assoc_item.rs](crates/ide-diagnostics/src/handlers/private_assoc_item.rs#3) |
| |
| |
| This diagnostic is triggered if the referenced associated item is not visible from the current |
| module. |
| |
| |
| |
| |
| #### private-field |
| |
| Source: [private_field.rs](crates/ide-diagnostics/src/handlers/private_field.rs#3) |
| |
| |
| This diagnostic is triggered if the accessed field is not visible from the current module. |
| |
| |
| |
| |
| #### proc-macro-disabled |
| |
| Source: [macro_error.rs](crates/ide-diagnostics/src/handlers/macro_error.rs#11) |
| |
| |
| This diagnostic is shown for proc macros that have been specifically disabled via `rust-analyzer.procMacro.ignored`. |
| |
| |
| |
| |
| #### remove-trailing-return |
| |
| Source: [remove_trailing_return.rs](crates/ide-diagnostics/src/handlers/remove_trailing_return.rs#8) |
| |
| |
| This diagnostic is triggered when there is a redundant `return` at the end of a function |
| or closure. |
| |
| |
| |
| |
| #### remove-unnecessary-else |
| |
| Source: [remove_unnecessary_else.rs](crates/ide-diagnostics/src/handlers/remove_unnecessary_else.rs#17) |
| |
| |
| 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). |
| |
| |
| |
| |
| #### replace-filter-map-next-with-find-map |
| |
| Source: [replace_filter_map_next_with_find_map.rs](crates/ide-diagnostics/src/handlers/replace_filter_map_next_with_find_map.rs#11) |
| |
| |
| This diagnostic is triggered when `.filter_map(..).next()` is used, rather than the more concise `.find_map(..)`. |
| |
| |
| |
| |
| #### trait-impl-incorrect-safety |
| |
| Source: [trait_impl_incorrect_safety.rs](crates/ide-diagnostics/src/handlers/trait_impl_incorrect_safety.rs#6) |
| |
| |
| Diagnoses incorrect safety annotations of trait impls. |
| |
| |
| |
| |
| #### trait-impl-missing-assoc_item |
| |
| Source: [trait_impl_missing_assoc_item.rs](crates/ide-diagnostics/src/handlers/trait_impl_missing_assoc_item.rs#7) |
| |
| |
| Diagnoses missing trait items in a trait impl. |
| |
| |
| |
| |
| #### trait-impl-orphan |
| |
| Source: [trait_impl_orphan.rs](crates/ide-diagnostics/src/handlers/trait_impl_orphan.rs#5) |
| |
| |
| Only traits defined in the current crate can be implemented for arbitrary types |
| |
| |
| |
| |
| #### trait-impl-redundant-assoc_item |
| |
| Source: [trait_impl_redundant_assoc_item.rs](crates/ide-diagnostics/src/handlers/trait_impl_redundant_assoc_item.rs#12) |
| |
| |
| Diagnoses redundant trait items in a trait impl. |
| |
| |
| |
| |
| #### type-mismatch |
| |
| Source: [type_mismatch.rs](crates/ide-diagnostics/src/handlers/type_mismatch.rs#20) |
| |
| |
| This diagnostic is triggered when the type of an expression or pattern does not match |
| the expected type. |
| |
| |
| |
| |
| #### typed-hole |
| |
| Source: [typed_hole.rs](crates/ide-diagnostics/src/handlers/typed_hole.rs#18) |
| |
| |
| This diagnostic is triggered when an underscore expression is used in an invalid position. |
| |
| |
| |
| |
| #### undeclared-label |
| |
| Source: [undeclared_label.rs](crates/ide-diagnostics/src/handlers/undeclared_label.rs#3) |
| |
| |
| |
| |
| |
| |
| #### unimplemented-builtin-macro |
| |
| Source: [unimplemented_builtin_macro.rs](crates/ide-diagnostics/src/handlers/unimplemented_builtin_macro.rs#3) |
| |
| |
| This diagnostic is shown for builtin macros which are not yet implemented by rust-analyzer |
| |
| |
| |
| |
| #### unlinked-file |
| |
| Source: [unlinked_file.rs](crates/ide-diagnostics/src/handlers/unlinked_file.rs#20) |
| |
| |
| 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 |
| |
| Source: [useless_braces.rs](crates/ide-diagnostics/src/handlers/useless_braces.rs#9) |
| |
| |
| Diagnostic for unnecessary braces in `use` items. |
| |
| |
| |
| |
| #### unreachable-label |
| |
| Source: [unreachable_label.rs](crates/ide-diagnostics/src/handlers/unreachable_label.rs#3) |
| |
| |
| |
| |
| |
| |
| #### unresolved-assoc-item |
| |
| Source: [unresolved_assoc_item.rs](crates/ide-diagnostics/src/handlers/unresolved_assoc_item.rs#3) |
| |
| |
| This diagnostic is triggered if the referenced associated item does not exist. |
| |
| |
| |
| |
| #### unresolved-extern-crate |
| |
| Source: [unresolved_extern_crate.rs](crates/ide-diagnostics/src/handlers/unresolved_extern_crate.rs#3) |
| |
| |
| This diagnostic is triggered if rust-analyzer is unable to discover referred extern crate. |
| |
| |
| |
| |
| #### unresolved-field |
| |
| Source: [unresolved_field.rs](crates/ide-diagnostics/src/handlers/unresolved_field.rs#23) |
| |
| |
| This diagnostic is triggered if a field does not exist on a given type. |
| |
| |
| |
| |
| #### unresolved-ident |
| |
| Source: [unresolved_ident.rs](crates/ide-diagnostics/src/handlers/unresolved_ident.rs#3) |
| |
| |
| This diagnostic is triggered if an expr-position ident is invalid. |
| |
| |
| |
| |
| #### unresolved-import |
| |
| Source: [unresolved_import.rs](crates/ide-diagnostics/src/handlers/unresolved_import.rs#3) |
| |
| |
| This diagnostic is triggered if rust-analyzer is unable to resolve a path in |
| a `use` declaration. |
| |
| |
| |
| |
| #### unresolved-macro-call |
| |
| Source: [unresolved_macro_call.rs](crates/ide-diagnostics/src/handlers/unresolved_macro_call.rs#3) |
| |
| |
| This diagnostic is triggered if rust-analyzer is unable to resolve the path |
| to a macro in a macro invocation. |
| |
| |
| |
| |
| #### unresolved-method |
| |
| Source: [unresolved_method.rs](crates/ide-diagnostics/src/handlers/unresolved_method.rs#15) |
| |
| |
| This diagnostic is triggered if a method does not exist on a given type. |
| |
| |
| |
| |
| #### unresolved-module |
| |
| Source: [unresolved_module.rs](crates/ide-diagnostics/src/handlers/unresolved_module.rs#8) |
| |
| |
| This diagnostic is triggered if rust-analyzer is unable to discover referred module. |
| |
| |
| |
| |
| #### unused-mut |
| |
| Source: [mutability_errors.rs](crates/ide-diagnostics/src/handlers/mutability_errors.rs#62) |
| |
| |
| This diagnostic is triggered when a mutable variable isn't actually mutated. |
| |
| |
| |
| |
| #### unused-variables |
| |
| Source: [unused_variables.rs](crates/ide-diagnostics/src/handlers/unused_variables.rs#13) |
| |
| |
| This diagnostic is triggered when a local variable is not used. |
| |
| |