mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add unused_variables
native diagnostic
This commit is contained in:
parent
e5e937ae5e
commit
7834b8fadb
12 changed files with 282 additions and 38 deletions
|
@ -56,6 +56,7 @@ mod handlers {
|
|||
pub(crate) mod unresolved_proc_macro;
|
||||
pub(crate) mod undeclared_label;
|
||||
pub(crate) mod unreachable_label;
|
||||
pub(crate) mod unused_variables;
|
||||
|
||||
// The handlers below are unusual, the implement the diagnostics as well.
|
||||
pub(crate) mod field_shorthand;
|
||||
|
@ -368,6 +369,7 @@ pub fn diagnostics(
|
|||
AnyDiagnostic::UnresolvedModule(d) => handlers::unresolved_module::unresolved_module(&ctx, &d),
|
||||
AnyDiagnostic::UnresolvedProcMacro(d) => handlers::unresolved_proc_macro::unresolved_proc_macro(&ctx, &d, config.proc_macros_enabled, config.proc_attr_macros_enabled),
|
||||
AnyDiagnostic::UnusedMut(d) => handlers::mutability_errors::unused_mut(&ctx, &d),
|
||||
AnyDiagnostic::UnusedVariable(d) => handlers::unused_variables::unused_variables(&ctx, &d),
|
||||
AnyDiagnostic::BreakOutsideOfLoop(d) => handlers::break_outside_of_loop::break_outside_of_loop(&ctx, &d),
|
||||
AnyDiagnostic::MismatchedTupleStructPatArgCount(d) => handlers::mismatched_arg_count::mismatched_tuple_struct_pat_arg_count(&ctx, &d),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue