Skip to content

Commit

Permalink
Fix diagnostics for unresolved patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Apr 17, 2016
1 parent ae33aa7 commit 1a374b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
}
}
}
} else {
} else if let Err(false) = self.resolve_path(pat_id, &path, 0, ValueNS) {
resolve_error(
self,
path.span,
Expand Down
4 changes: 4 additions & 0 deletions src/test/compile-fail/pattern-error-continue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ fn main() {
//~^ ERROR mismatched types
//~| expected `char`
//~| found `bool`

match () {
E::V => {} //~ ERROR failed to resolve. Use of undeclared type or module `E`
}
}

0 comments on commit 1a374b8

Please sign in to comment.