Skip to content

Commit 77ed097

Browse files
committed
rustc: Use std::util::unreachable
1 parent b32e091 commit 77ed097

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/rustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ fn unresolved_err(e: env, cx: ctxt, sp: span, name: ident, kind: str) {
859859
_ { ret none; }
860860
}
861861
}
862-
fail;
862+
std::util::unreachable()
863863
}
864864
let path = name;
865865
alt cx {

src/rustc/middle/trans/alt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn variant_opt(tcx: ty::ctxt, pat_id: ast::node_id) -> opt {
7070
for v: ty::variant_info in *variants {
7171
if vdef.var == v.id { ret var(v.disr_val, vdef); }
7272
}
73-
fail;
73+
std::util::unreachable();
7474
}
7575

7676
type bind_map = [{ident: ast::ident, val: ValueRef}];

src/rustc/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ fn do_autoderef(fcx: @fn_ctxt, sp: span, t: ty::t) -> ty::t {
10361036
_ { ret t1; }
10371037
}
10381038
}
1039-
fail;
1039+
std::util::unreachable();
10401040
}
10411041

10421042
fn resolve_type_vars_if_possible(fcx: @fn_ctxt, typ: ty::t) -> ty::t {

src/rustc/syntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ fn operator_prec(op: ast::binop) -> int {
14181418
for spec: parse::parser::op_spec in *parse::parser::prec_table() {
14191419
if spec.op == op { ret spec.prec; }
14201420
}
1421-
fail;
1421+
std::util::unreachable();
14221422
}
14231423

14241424
fn need_parens(expr: @ast::expr, outer_prec: int) -> bool {

0 commit comments

Comments
 (0)