Fix ICE that @steveklabnik encountered in rust-ice. The problems turned out to be that were being very loose with bound regions in trans (we were basically just ignoring and flattening binders). Since binders are significant to subtyping and hence to trait selection, this can cause a lot of problems. So this patch makes us treat them more strictly -- for example, we propagate binders, and avoid skipping past the Binder
by writing foo.0
.
Fixes #20644.
This commit is contained in:
parent
8efd9901b6
commit
2486d93e5b
23 changed files with 399 additions and 183 deletions
|
@ -514,7 +514,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
|||
|
||||
let func_or_rcvr_exit = self.expr(func_or_rcvr, pred);
|
||||
let ret = self.straightline(call_expr, func_or_rcvr_exit, args);
|
||||
if return_ty == ty::FnDiverging {
|
||||
if return_ty.diverges() {
|
||||
self.add_node(ast::DUMMY_NODE_ID, &[])
|
||||
} else {
|
||||
ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue