rustc: Use std::util::unreachable
This commit is contained in:
@@ -859,7 +859,7 @@ fn unresolved_err(e: env, cx: ctxt, sp: span, name: ident, kind: str) {
|
|||||||
_ { ret none; }
|
_ { ret none; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fail;
|
std::util::unreachable()
|
||||||
}
|
}
|
||||||
let path = name;
|
let path = name;
|
||||||
alt cx {
|
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 {
|
for v: ty::variant_info in *variants {
|
||||||
if vdef.var == v.id { ret var(v.disr_val, vdef); }
|
if vdef.var == v.id { ret var(v.disr_val, vdef); }
|
||||||
}
|
}
|
||||||
fail;
|
std::util::unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
type bind_map = [{ident: ast::ident, val: ValueRef}];
|
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; }
|
_ { ret t1; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fail;
|
std::util::unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resolve_type_vars_if_possible(fcx: @fn_ctxt, typ: ty::t) -> ty::t {
|
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() {
|
for spec: parse::parser::op_spec in *parse::parser::prec_table() {
|
||||||
if spec.op == op { ret spec.prec; }
|
if spec.op == op { ret spec.prec; }
|
||||||
}
|
}
|
||||||
fail;
|
std::util::unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn need_parens(expr: @ast::expr, outer_prec: int) -> bool {
|
fn need_parens(expr: @ast::expr, outer_prec: int) -> bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user