diff options
| author | bors <bors@rust-lang.org> | 2013-09-20 00:36:11 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-20 00:36:11 -0700 |
| commit | e5fdc7dee52033f1097019d3aafe838db9ab5e3e (patch) | |
| tree | e3965282a18b6ed03a811f118bc6be4262082fef /src/libextra | |
| parent | c7c769d8c2efb05dfa5850ae4aec0d6509d713dc (diff) | |
| parent | e2807a4565575c6a08a2a65c76ee37bf3f48c841 (diff) | |
| download | rust-e5fdc7dee52033f1097019d3aafe838db9ab5e3e.tar.gz rust-e5fdc7dee52033f1097019d3aafe838db9ab5e3e.zip | |
auto merge of #9320 : chris-morgan/rust/unreachable-macro-part-two-of-two-containing-the-destruction-of-the-unreachable-function, r=alexcrichton
This is the second of two parts of #8991, now possible as a new snapshot has been made. (The first part implemented the unreachable!() macro; it was #8992, 6b7b8f2682.) ``std::util::unreachable()`` is removed summarily; any code which used it should now use the ``unreachable!()`` macro. Closes #9312. Closes #8991.
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/glob.rs | 4 | ||||
| -rw-r--r-- | src/libextra/terminfo/parm.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libextra/glob.rs b/src/libextra/glob.rs index 934943f6fbb..72368aeff23 100644 --- a/src/libextra/glob.rs +++ b/src/libextra/glob.rs @@ -23,7 +23,7 @@ * `glob`/`fnmatch` functions. */ -use std::{os, path, util}; +use std::{os, path}; use sort; @@ -356,7 +356,7 @@ impl Pattern { chars_eq(c, c2, options.case_sensitive) } AnySequence => { - util::unreachable() + unreachable!() } }; if !matches { diff --git a/src/libextra/terminfo/parm.rs b/src/libextra/terminfo/parm.rs index c607ea03bb3..8c1595e7920 100644 --- a/src/libextra/terminfo/parm.rs +++ b/src/libextra/terminfo/parm.rs @@ -261,7 +261,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables) flags.width = (cur as uint - '0' as uint); fstate = FormatStateWidth; } - _ => util::unreachable() + _ => unreachable!() } state = FormatPattern(flags, fstate); } @@ -487,7 +487,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> { FormatDigit => 10, FormatOctal => 8, FormatHex|FormatHEX => 16, - FormatString => util::unreachable() + FormatString => unreachable!() }; let mut s = ~[]; match op { @@ -535,7 +535,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> { s.push_all_move(s_); } } - FormatString => util::unreachable() + FormatString => unreachable!() } s } |
