Skip to content

Commit 5f52669

Browse files
committed
Fix #4855: handle bot in regionck
1 parent 7f5d7e1 commit 5f52669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/typeck/check/regionck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ pub mod guarantor {
615615
// expressions, both of which always yield a region variable, so
616616
// mk_subr should never fail.
617617
let rptr_ty = rcx.resolve_node_type(id);
618-
if !ty::type_is_error(rptr_ty) {
618+
if !ty::type_is_error(rptr_ty) && !ty::type_is_bot(rptr_ty) {
619619
let tcx = rcx.fcx.ccx.tcx;
620620
debug!("rptr_ty=%s", ty_to_str(tcx, rptr_ty));
621621
let r = ty::ty_region(tcx, span, rptr_ty);

0 commit comments

Comments
 (0)