Skip to content

Commit

Permalink
Fix #4855: handle bot in regionck
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Mar 26, 2013
1 parent 7f5d7e1 commit 5f52669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ pub mod guarantor {
// 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);
Expand Down

0 comments on commit 5f52669

Please sign in to comment.