rustc: Use std::util::unreachable

This commit is contained in:
Brian Anderson 2012-03-05 18:16:25 -08:00
parent b32e09172c
commit 77ed09728b
4 changed files with 4 additions and 4 deletions

View file

@ -859,7 +859,7 @@ fn find_fn_or_mod_scope(sc: scopes) -> option<scope> {
_ { ret none; }
}
}
fail;
std::util::unreachable()
}
let path = name;
alt cx {

View file

@ -70,7 +70,7 @@ fn variant_opt(tcx: ty::ctxt, pat_id: ast::node_id) -> opt {
for v: ty::variant_info in *variants {
if vdef.var == v.id { ret var(v.disr_val, vdef); }
}
fail;
std::util::unreachable();
}
type bind_map = [{ident: ast::ident, val: ValueRef}];

View file

@ -1036,7 +1036,7 @@ fn do_autoderef(fcx: @fn_ctxt, sp: span, t: ty::t) -> ty::t {
_ { ret t1; }
}
}
fail;
std::util::unreachable();
}
fn resolve_type_vars_if_possible(fcx: @fn_ctxt, typ: ty::t) -> ty::t {

View file

@ -1418,7 +1418,7 @@ fn operator_prec(op: ast::binop) -> int {
for spec: parse::parser::op_spec in *parse::parser::prec_table() {
if spec.op == op { ret spec.prec; }
}
fail;
std::util::unreachable();
}
fn need_parens(expr: @ast::expr, outer_prec: int) -> bool {