mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
rustc: Use std::util::unreachable
This commit is contained in:
parent
b32e09172c
commit
77ed09728b
@ -859,7 +859,7 @@ fn unresolved_err(e: env, cx: ctxt, sp: span, name: ident, kind: str) {
|
||||
_ { ret none; }
|
||||
}
|
||||
}
|
||||
fail;
|
||||
std::util::unreachable()
|
||||
}
|
||||
let path = name;
|
||||
alt cx {
|
||||
|
@ -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}];
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user