diff options
| author | Chris Morgan <me@chrismorgan.info> | 2013-09-19 15:04:03 +1000 |
|---|---|---|
| committer | Chris Morgan <me@chrismorgan.info> | 2013-09-19 15:04:03 +1000 |
| commit | e2807a4565575c6a08a2a65c76ee37bf3f48c841 (patch) | |
| tree | a3902c5db8e070e6e91a1f5b253c45b0ea2c801a /src/libextra | |
| parent | 4dacd736510b2ae28a54489fe88571f1a6de019f (diff) | |
| download | rust-e2807a4565575c6a08a2a65c76ee37bf3f48c841.tar.gz rust-e2807a4565575c6a08a2a65c76ee37bf3f48c841.zip | |
Replace unreachable() calls with unreachable!().
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 43a4ecf5616..49bf1f3d0db 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 } |
