Re-use the resolver in InferenceContext instead of rebuilding it on every expression change

This commit is contained in:
Lukas Wirth 2023-03-05 14:37:44 +01:00
parent e6ba791dce
commit a8606e5363
7 changed files with 116 additions and 38 deletions

View file

@ -163,7 +163,7 @@ fn check_impl(ra_fixture: &str, allow_none: bool, only_types: bool, display_sour
} else {
ty.display_test(&db).to_string()
};
assert_eq!(actual, expected);
assert_eq!(actual, expected, "type annotation differs at {:#?}", range.range);
}
}
@ -179,7 +179,7 @@ fn check_impl(ra_fixture: &str, allow_none: bool, only_types: bool, display_sour
} else {
ty.display_test(&db).to_string()
};
assert_eq!(actual, expected);
assert_eq!(actual, expected, "type annotation differs at {:#?}", range.range);
}
if let Some(expected) = adjustments.remove(&range) {
let adjustments = inference_result