Don't report a hard error if there are inference failures until
after we check casts, because sometimes casts can influence inference, unfortunately. We do re-run `select_all_trait_obligations` during regionck anyhow.
This commit is contained in:
parent
d07d465cf6
commit
4561607403
1 changed files with 1 additions and 2 deletions
|
|
@ -445,9 +445,8 @@ fn check_bare_fn<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
|
|||
|
||||
fcx.select_all_obligations_and_apply_defaults();
|
||||
upvar::closure_analyze_fn(&fcx, fn_id, decl, body);
|
||||
fcx.select_all_obligations_or_error();
|
||||
fcx.select_obligations_where_possible();
|
||||
fcx.check_casts();
|
||||
|
||||
fcx.select_all_obligations_or_error(); // Casts can introduce new obligations.
|
||||
|
||||
regionck::regionck_fn(&fcx, fn_id, fn_span, decl, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue