mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
remove panics
This commit is contained in:
parent
8c378af721
commit
b87b7a088f
2 changed files with 213 additions and 65 deletions
|
@ -90,9 +90,12 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
}
|
||||
|
||||
match is_useful(&cx, &seen, &PatStack::from_wild()) {
|
||||
Usefulness::Useful => (),
|
||||
Ok(Usefulness::Useful) => (),
|
||||
// if a wildcard pattern is not useful, then all patterns are covered
|
||||
Usefulness::NotUseful => return,
|
||||
Ok(Usefulness::NotUseful) => return,
|
||||
// this path is for unimplemented checks, so we err on the side of not
|
||||
// reporting any errors
|
||||
_ => return,
|
||||
}
|
||||
|
||||
if let Ok(source_ptr) = source_map.expr_syntax(id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue