Skip to content

Commit b3ffd79

Browse files
committed
---
yaml --- r: 14717 b: refs/heads/try c: d048a00 h: refs/heads/master i: 14715: c14a256 v: v3
1 parent 1b2e53e commit b3ffd79

File tree

16 files changed

+32
-31
lines changed

16 files changed

+32
-31
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 0824d1501b7911f45d028cb387e5e159bdd63eca
5+
refs/heads/try: d048a00cf3c275d9f9974960d0db463844da898e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/fuzzer/rand_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn weighted_choice<T: copy>(r : rand::rng, v : [weighted<T>]) -> T {
5050
ret item;
5151
}
5252
}
53-
std::util::unreachable();
53+
core::unreachable();
5454
}
5555

5656
fn weighted_vec<T: copy>(v : [weighted<T>]) -> [T] {

branches/try/src/libcore/core.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import option::{some, none};
66
import option = option::t;
77
import path = path::path;
88
import vec::vec_len;
9-
export path, option, some, none, vec_len;
9+
export path, option, some, none, vec_len, unreachable;
1010

1111
// Export the log levels as global constants. Higher levels mean
1212
// more-verbosity. Error is the bottom level, default logging level is
@@ -39,3 +39,15 @@ mod std {
3939
use std;
4040
import std::test;
4141
}
42+
43+
/*
44+
Function: unreachable
45+
46+
A standard function to use to indicate unreachable code. Because the
47+
function is guaranteed to fail typestate will correctly identify
48+
any code paths following the appearance of this function as unreachable.
49+
*/
50+
fn unreachable() -> ! {
51+
fail "Internal error: entered unreachable code";
52+
}
53+

branches/try/src/libstd/generic_os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn getenv(n: str) -> option<str> {
8080
ret option::some(str::from_bytes(v)); // UTF-8 or fail
8181
} else { nsize = res; }
8282
}
83-
util::unreachable();
83+
core::unreachable();
8484
}
8585

8686
#[cfg(target_os = "win32")]

branches/try/src/libstd/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mod chained {
158158
}
159159
}
160160
}
161-
util::unreachable();
161+
core::unreachable();
162162
}
163163

164164
fn search_tbl<K: copy, V: copy>(

branches/try/src/libstd/rope.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ mod node {
10281028
}
10291029
}
10301030
}
1031-
util::unreachable();
1031+
core::unreachable();
10321032
}
10331033

10341034
/*
@@ -1092,7 +1092,7 @@ mod node {
10921092
}
10931093
}
10941094
}
1095-
util::unreachable();
1095+
core::unreachable();
10961096
}
10971097

10981098
fn concat2(left: @node, right: @node) -> @node {
@@ -1176,7 +1176,7 @@ mod node {
11761176
}
11771177
}
11781178
}
1179-
util::unreachable();
1179+
core::unreachable();
11801180
}
11811181

11821182
/*
@@ -1209,7 +1209,7 @@ mod node {
12091209
}
12101210
}
12111211
}
1212-
util::unreachable();
1212+
core::unreachable();
12131213
}
12141214

12151215
mod leaf_iterator {
@@ -1248,7 +1248,7 @@ mod node {
12481248
}
12491249
}
12501250
}
1251-
util::unreachable();
1251+
core::unreachable();
12521252
}
12531253
}
12541254

@@ -1292,7 +1292,7 @@ mod node {
12921292
}
12931293
}
12941294
}
1295-
util::unreachable();
1295+
core::unreachable();
12961296
}
12971297

12981298
fn get_current_or_next_leaf(it: t) -> option<leaf> {

branches/try/src/libstd/util.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ The identity function
99
*/
1010
pure fn id<T: copy>(x: T) -> T { x }
1111

12-
/*
13-
Function: unreachable
14-
15-
A standard function to use to indicate unreachable code. Because the
16-
function is guaranteed to fail typestate will correctly identify
17-
any code paths following the appearance of this function as unreachable.
18-
*/
19-
fn unreachable() -> ! {
20-
fail "Internal error: entered unreachable code";
21-
}
22-
2312
/* FIXME (issue #141): See test/run-pass/constrained-type.rs. Uncomment
2413
* the constraint once fixed. */
2514
/*

branches/try/src/rustc/back/rpath.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn get_rpath_relative_to_output(os: session::os,
106106
session::os_linux { "$ORIGIN" + fs::path_sep() }
107107
session::os_freebsd { "$ORIGIN" + fs::path_sep() }
108108
session::os_macos { "@executable_path" + fs::path_sep() }
109-
session::os_win32 { std::util::unreachable(); }
109+
session::os_win32 { core::unreachable(); }
110110
};
111111

112112
prefix + get_relative_to(

branches/try/src/rustc/middle/alias.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import syntax::visit;
66
import visit::vt;
77
import std::list;
88
import std::map::hashmap;
9-
import std::util::unreachable;
9+
import core::unreachable;
1010
import option::is_none;
1111
import list::list;
1212
import driver::session::session;

branches/try/src/rustc/middle/last_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import syntax::{visit, ast_util};
22
import syntax::ast::*;
33
import syntax::codemap::span;
44
import std::list::{is_not_empty, list, nil, cons, tail};
5-
import std::util::unreachable;
5+
import core::unreachable;
66
import std::list;
77
import std::map::hashmap;
88

branches/try/src/rustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ fn unresolved_err(e: env, cx: ctxt, sp: span, name: ident, kind: str) {
861861
_ { ret none; }
862862
}
863863
}
864-
std::util::unreachable()
864+
core::unreachable()
865865
}
866866
let path = name;
867867
alt cx {

branches/try/src/rustc/middle/trans/alt.rs

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

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

branches/try/src/rustc/middle/trans/uniq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn make_free_glue(bcx: block, vptr: ValueRef, t: ty::t)
4444
fn content_ty(t: ty::t) -> ty::t {
4545
alt ty::get(t).struct {
4646
ty::ty_uniq({ty: ct, _}) { ct }
47-
_ { std::util::unreachable(); }
47+
_ { core::unreachable(); }
4848
}
4949
}
5050

branches/try/src/rustc/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ fn do_autoderef(fcx: @fn_ctxt, sp: span, t: ty::t) -> ty::t {
10341034
_ { ret t1; }
10351035
}
10361036
}
1037-
std::util::unreachable();
1037+
core::unreachable();
10381038
}
10391039

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

branches/try/src/rustc/syntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ fn parse_capture_clause(p: parser) -> @ast::capture_clause {
13211321
_ { ret res; }
13221322
}
13231323
}
1324-
std::util::unreachable();
1324+
core::unreachable();
13251325
}
13261326

13271327
let copies = [];

branches/try/src/rustc/syntax/print/pprust.rs

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

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

0 commit comments

Comments
 (0)