Replace most invocations of fail keyword with die! macro
This commit is contained in:
parent
adb9d0e8a1
commit
6fb4239bb3
22 changed files with 49 additions and 49 deletions
|
|
@ -9,5 +9,5 @@
|
|||
// except according to those terms.
|
||||
|
||||
pub unsafe fn f(xs: ~[int]) {
|
||||
xs.map(|_x| { unsafe fn q() { fail; } });
|
||||
xs.map(|_x| { unsafe fn q() { die!(); } });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ fn parse_opts(argv: ~[~str]) -> Config {
|
|||
Ok(ref m) => {
|
||||
return Config {stress: getopts::opt_present(m, ~"stress")}
|
||||
}
|
||||
Err(_) => { fail; }
|
||||
Err(_) => { die!(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ fn a() -> &[int] {
|
|||
let vec = [1, 2, 3, 4];
|
||||
let tail = match vec { //~ ERROR illegal borrow
|
||||
[_a, ..tail] => tail,
|
||||
_ => fail ~"foo"
|
||||
_ => die!(~"foo")
|
||||
};
|
||||
move tail
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ fn a() -> &int {
|
|||
let vec = [1, 2, 3, 4];
|
||||
let tail = match vec { //~ ERROR illegal borrow
|
||||
[_a, ..tail] => &tail[0],
|
||||
_ => fail ~"foo"
|
||||
_ => die!(~"foo")
|
||||
};
|
||||
move tail
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@ fn main() {
|
|||
// We shouldn't be able to get past this recv since there's no
|
||||
// message available
|
||||
let i: int = po.recv();
|
||||
fail ~"badfail";
|
||||
die!(~"badfail");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue