1
Fork 0

Auto merge of #96155 - jackh726:param-heuristics-followup, r=estebank

Followups for method call error change

Each commit is self-contained. Fixes most of the followup reviews from that PR.

r? `@estebank`
This commit is contained in:
bors 2022-05-08 04:05:36 +00:00
commit 030c886c29
44 changed files with 265 additions and 312 deletions

View file

@ -1584,9 +1584,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
Variable(ty::error::ExpectedFound<Ty<'a>>),
Fixed(&'static str),
}
let (expected_found, exp_found, is_simple_error) = match values {
None => (None, Mismatch::Fixed("type"), false),
let (expected_found, exp_found, is_simple_error, values) = match values {
None => (None, Mismatch::Fixed("type"), false, None),
Some(values) => {
let values = self.resolve_vars_if_possible(values);
let (is_simple_error, exp_found) = match values {
ValuePairs::Terms(infer::ExpectedFound {
expected: ty::Term::Ty(expected),
@ -1614,7 +1615,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
return;
}
};
(vals, exp_found, is_simple_error)
(vals, exp_found, is_simple_error, Some(values))
}
};