1
Fork 0

Rollup merge of #33046 - jseyfried:fix_unresolved_pattern_diagnostics, r=eddyb

Fix diagnostics for unresolved patterns

This fixes #33043, a bug in the diagnostics for unresolved patterns.
r? @eddyb
This commit is contained in:
Manish Goregaokar 2016-04-17 17:50:35 +05:30
commit e1db767dbc
2 changed files with 5 additions and 1 deletions

View file

@ -2406,7 +2406,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,

View file

@ -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`
}
}