Fix #4855: handle bot in regionck
This commit is contained in:
parent
7f5d7e1c2e
commit
5f52669296
@ -615,7 +615,7 @@ fn link(
|
||||
// expressions, both of which always yield a region variable, so
|
||||
// mk_subr should never fail.
|
||||
let rptr_ty = rcx.resolve_node_type(id);
|
||||
if !ty::type_is_error(rptr_ty) {
|
||||
if !ty::type_is_error(rptr_ty) && !ty::type_is_bot(rptr_ty) {
|
||||
let tcx = rcx.fcx.ccx.tcx;
|
||||
debug!("rptr_ty=%s", ty_to_str(tcx, rptr_ty));
|
||||
let r = ty::ty_region(tcx, span, rptr_ty);
|
||||
|
Loading…
Reference in New Issue
Block a user