mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
add unnecessary else diagnostic
This commit is contained in:
parent
1974e7490d
commit
62cc4f9c46
6 changed files with 380 additions and 4 deletions
|
@ -43,6 +43,7 @@ mod handlers {
|
|||
pub(crate) mod no_such_field;
|
||||
pub(crate) mod private_assoc_item;
|
||||
pub(crate) mod private_field;
|
||||
pub(crate) mod remove_unnecessary_else;
|
||||
pub(crate) mod replace_filter_map_next_with_find_map;
|
||||
pub(crate) mod trait_impl_incorrect_safety;
|
||||
pub(crate) mod trait_impl_missing_assoc_item;
|
||||
|
@ -382,6 +383,7 @@ pub fn diagnostics(
|
|||
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),
|
||||
AnyDiagnostic::RemoveUnnecessaryElse(d) => handlers::remove_unnecessary_else::remove_unnecessary_else(&ctx, &d),
|
||||
};
|
||||
res.push(d)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue