Use new try impl for ? operator

This commit is contained in:
Sam Mohr 2024-12-05 02:13:08 -08:00
parent 193c23bac8
commit de626102c8
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
20 changed files with 429 additions and 110 deletions

View file

@ -917,6 +917,7 @@ fn solve(
ok_payload_var,
err_payload_var,
region,
kind,
} = try_target_constraint;
let target_actual = either_type_index_to_var(
@ -990,7 +991,7 @@ fn solve(
Failure(vars, actual_type, _expected_type, _bad_impls) => {
env.introduce(rank, &vars);
let problem = TypeError::InvalidTryTarget(*region, actual_type);
let problem = TypeError::InvalidTryTarget(*region, actual_type, *kind);
problems.push(problem);