diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-03-08 14:29:17 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-03-08 14:30:01 -0800 |
| commit | d048a00cf3c275d9f9974960d0db463844da898e (patch) | |
| tree | ed70a4437963d2c11daeeb91bf18be117c1f3abf /src/libstd | |
| parent | 0824d1501b7911f45d028cb387e5e159bdd63eca (diff) | |
| download | rust-d048a00cf3c275d9f9974960d0db463844da898e.tar.gz rust-d048a00cf3c275d9f9974960d0db463844da898e.zip | |
Change util::unreachable to core::unreachable
Closes #1931
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/generic_os.rs | 2 | ||||
| -rw-r--r-- | src/libstd/map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rope.rs | 12 | ||||
| -rw-r--r-- | src/libstd/util.rs | 11 |
4 files changed, 8 insertions, 19 deletions
diff --git a/src/libstd/generic_os.rs b/src/libstd/generic_os.rs index 77cab821c5f..0432d136c35 100644 --- a/src/libstd/generic_os.rs +++ b/src/libstd/generic_os.rs @@ -80,7 +80,7 @@ fn getenv(n: str) -> option<str> { ret option::some(str::from_bytes(v)); // UTF-8 or fail } else { nsize = res; } } - util::unreachable(); + core::unreachable(); } #[cfg(target_os = "win32")] diff --git a/src/libstd/map.rs b/src/libstd/map.rs index 0511b82b5ba..bb67b574a44 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -158,7 +158,7 @@ mod chained { } } } - util::unreachable(); + core::unreachable(); } fn search_tbl<K: copy, V: copy>( diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs index bf8aa7667a2..ea99d58aa86 100644 --- a/src/libstd/rope.rs +++ b/src/libstd/rope.rs @@ -1028,7 +1028,7 @@ mod node { } } } - util::unreachable(); + core::unreachable(); } /* @@ -1092,7 +1092,7 @@ mod node { } } } - util::unreachable(); + core::unreachable(); } fn concat2(left: @node, right: @node) -> @node { @@ -1176,7 +1176,7 @@ mod node { } } } - util::unreachable(); + core::unreachable(); } /* @@ -1209,7 +1209,7 @@ mod node { } } } - util::unreachable(); + core::unreachable(); } mod leaf_iterator { @@ -1248,7 +1248,7 @@ mod node { } } } - util::unreachable(); + core::unreachable(); } } @@ -1292,7 +1292,7 @@ mod node { } } } - util::unreachable(); + core::unreachable(); } fn get_current_or_next_leaf(it: t) -> option<leaf> { diff --git a/src/libstd/util.rs b/src/libstd/util.rs index 54ffdbcd2db..2be273f8ab9 100644 --- a/src/libstd/util.rs +++ b/src/libstd/util.rs @@ -9,17 +9,6 @@ The identity function */ pure fn id<T: copy>(x: T) -> T { x } -/* -Function: unreachable - -A standard function to use to indicate unreachable code. Because the -function is guaranteed to fail typestate will correctly identify -any code paths following the appearance of this function as unreachable. -*/ -fn unreachable() -> ! { - fail "Internal error: entered unreachable code"; -} - /* FIXME (issue #141): See test/run-pass/constrained-type.rs. Uncomment * the constraint once fixed. */ /* |
