Skip to content

Commit a99ba11

Browse files
committed
rustc::regionck: fix ICE when getting signature of ty_err
Fixes #5062
1 parent c74f397 commit a99ba11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ fn constrain_call(rcx: @mut Rcx,
460460
debug!("constrain_call(call_expr=%s, implicitly_ref_args=%?)",
461461
call_expr.repr(tcx), implicitly_ref_args);
462462
let callee_ty = rcx.resolve_node_type(callee_id);
463+
if ty::type_is_error(callee_ty) {
464+
// Bail, as function type is unknown
465+
return;
466+
}
463467
let fn_sig = ty::ty_fn_sig(callee_ty);
464468

465469
// `callee_region` is the scope representing the time in which the

0 commit comments

Comments
 (0)