mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Fix expect
This commit is contained in:
parent
baa43a86ab
commit
344cf1db5f
1 changed files with 4 additions and 2 deletions
|
@ -1188,8 +1188,10 @@ impl DefWithBody {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (expr, mismatch) in infer.expr_type_mismatches() {
|
for (expr, mismatch) in infer.expr_type_mismatches() {
|
||||||
let expr =
|
let expr = match source_map.expr_syntax(expr) {
|
||||||
source_map.expr_syntax(expr).expect("break outside of loop in synthetic syntax");
|
Ok(expr) => expr,
|
||||||
|
Err(SyntheticSyntax) => continue,
|
||||||
|
};
|
||||||
acc.push(
|
acc.push(
|
||||||
TypeMismatch {
|
TypeMismatch {
|
||||||
expr,
|
expr,
|
||||||
|
|
Loading…
Reference in a new issue