aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/expr.rs')
-rw-r--r--crates/ra_hir_ty/src/expr.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs
index 3caeeb394..7498d04dc 100644
--- a/crates/ra_hir_ty/src/expr.rs
+++ b/crates/ra_hir_ty/src/expr.rs
@@ -90,9 +90,12 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
90 } 90 }
91 91
92 match is_useful(&cx, &seen, &PatStack::from_wild()) { 92 match is_useful(&cx, &seen, &PatStack::from_wild()) {
93 Usefulness::Useful => (), 93 Ok(Usefulness::Useful) => (),
94 // if a wildcard pattern is not useful, then all patterns are covered 94 // if a wildcard pattern is not useful, then all patterns are covered
95 Usefulness::NotUseful => return, 95 Ok(Usefulness::NotUseful) => return,
96 // this path is for unimplemented checks, so we err on the side of not
97 // reporting any errors
98 _ => return,
96 } 99 }
97 100
98 if let Ok(source_ptr) = source_map.expr_syntax(id) { 101 if let Ok(source_ptr) = source_map.expr_syntax(id) {