mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
internal: Record mismatches of pattern types.
This commit is contained in:
parent
49a5d6a8d4
commit
472317c008
6 changed files with 93 additions and 11 deletions
|
@ -130,7 +130,10 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
|
|||
}
|
||||
Err(SyntheticSyntax) => continue,
|
||||
};
|
||||
types.push((syntax_ptr, ty));
|
||||
types.push((syntax_ptr.clone(), ty));
|
||||
if let Some(mismatch) = inference_result.type_mismatch_for_pat(pat) {
|
||||
mismatches.push((syntax_ptr, mismatch));
|
||||
}
|
||||
}
|
||||
|
||||
for (expr, ty) in inference_result.type_of_expr.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue