Replace most invocations of fail keyword with die! macro

This commit is contained in:
Nick Desaulniers 2013-01-31 17:51:01 -08:00 committed by Brian Anderson
parent 2db3175c76
commit aee7929469
331 changed files with 914 additions and 908 deletions

View file

@ -25,7 +25,7 @@ pub fn alist_get<A: Copy, B: Copy>(lst: alist<A,B>, k: A) -> B {
for lst.data.each |entry| {
if eq_fn(entry.key, k) { return entry.value; }
}
fail;
die!();
}
#[inline]

View file

@ -14,7 +14,7 @@ impl methods<T:copy> for maybe<T> {
fn ~[](idx: uint) -> T {
match self {
just(t) { t }
nothing { fail; }
nothing { die!(); }
}
}
}
}

View file

@ -36,6 +36,6 @@ impl bool: read {
pub fn read<T: read Copy>(s: ~str) -> T {
match read::readMaybe(s) {
Some(x) => x,
_ => fail ~"read failed!"
_ => die!(~"read failed!")
}
}

View file

@ -212,7 +212,7 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result {
match *c {
white => { -1i64 }
black(parent) => { parent }
_ => { fail ~"Found remaining gray nodes in BFS" }
_ => { die!(~"Found remaining gray nodes in BFS") }
}
}
}
@ -294,7 +294,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
match *c {
white => { -1i64 }
black(parent) => { parent }
_ => { fail ~"Found remaining gray nodes in BFS" }
_ => { die!(~"Found remaining gray nodes in BFS") }
}
}
}

View file

@ -56,7 +56,7 @@ macro_rules! follow (
$(Some($message($($x,)* move next)) => {
let $next = move next;
move $e })+
_ => { fail }
_ => { die!() }
}
);
@ -67,7 +67,7 @@ macro_rules! follow (
$(Some($message(move next)) => {
let $next = move next;
move $e })+
_ => { fail }
_ => { die!() }
}
)
)

View file

@ -118,7 +118,7 @@ pub fn solve_grid(g: grid_t) {
ptr = ptr + 1u;
} else {
// no: redo this field aft recoloring pred; unless there is none
if ptr == 0u { fail ~"No solution found for this sudoku"; }
if ptr == 0u { die!(~"No solution found for this sudoku"); }
ptr = ptr - 1u;
}
}

View file

@ -66,7 +66,7 @@ fn r(l: @nillist) -> r {
fn recurse_or_fail(depth: int, st: Option<State>) {
if depth == 0 {
debug!("unwinding %.4f", precise_time_s());
fail;
die!();
} else {
let depth = depth - 1;

View file

@ -46,6 +46,6 @@ fn main() {
let (p,c) = pipes::stream();
child_generation(uint::from_str(args[1]).get(), move c);
if p.try_recv().is_none() {
fail ~"it happened when we slumbered";
die!(~"it happened when we slumbered");
}
}

View file

@ -77,7 +77,7 @@ fn main() {
}
// Grandparent group waits for middle group to be gone, then fails
error!("Grandparent group wakes up and fails");
fail;
die!();
};
assert x.is_err();
}

View file

@ -11,7 +11,7 @@
// a good test that we merge paths correctly in the presence of a
// variable that's used before it's declared
fn my_fail() -> ! { fail; }
fn my_fail() -> ! { die!(); }
fn main() {
match true { false => { my_fail(); } true => { } }

View file

@ -12,7 +12,7 @@
// Tests that a function with a ! annotation always actually fails
fn bad_bang(i: uint) -> ! {
if i < 0u { } else { fail; }
if i < 0u { } else { die!(); }
//~^ ERROR expected `!` but found `()`
}

View file

@ -20,6 +20,6 @@ fn main() {
let x = Some(X { x: () });
match move x {
Some(ref _y @ move _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
None => fail
None => die!()
}
}

View file

@ -20,6 +20,6 @@ fn main() {
let x = Some((X { x: () }, X { x: () }));
match move x {
Some((ref _y, move _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
None => fail
None => die!()
}
}

View file

@ -22,6 +22,6 @@ fn main() {
let x = some2(X { x: () }, X { x: () });
match move x {
some2(ref _y, move _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
none2 => fail
none2 => die!()
}
}

View file

@ -20,6 +20,6 @@ fn main() {
let x = Some((X { x: () }, X { x: () }));
match move x {
Some((move _y, ref _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
None => fail
None => die!()
}
}

View file

@ -13,8 +13,8 @@ fn main() {
let x = Some(p);
c.send(false);
match move x {
Some(move z) if z.recv() => { fail }, //~ ERROR cannot bind by-move into a pattern guard
Some(move z) if z.recv() => { die!() }, //~ ERROR cannot bind by-move into a pattern guard
Some(move z) => { assert !z.recv(); },
None => fail
None => die!()
}
}

View file

@ -22,6 +22,6 @@ fn main() {
let x = Some(X { x: () });
match x {
Some(move _z) => { }, //~ ERROR cannot bind by-move when matching an lvalue
None => fail
None => die!()
}
}

View file

@ -24,6 +24,6 @@ fn main() {
let x = Y { y: Some(X { x: () }) };
match x.y {
Some(move _z) => { }, //~ ERROR cannot bind by-move when matching an lvalue
None => fail
None => die!()
}
}

View file

@ -20,6 +20,6 @@ fn main() {
let x = Some(X { x: () });
match move x {
Some(move _y @ ref _z) => { }, //~ ERROR cannot bind by-move with sub-bindings
None => fail
None => die!()
}
}

View file

@ -23,7 +23,7 @@ fn main() {
x = X(Left((0,0))); //~ ERROR assigning to captured outer mutable variable
(*f)()
},
_ => fail
_ => die!()
}
}
}

View file

@ -16,7 +16,7 @@ use core::either::{Either, Left, Right};
*x = Right(1.0);
*z
}
_ => fail
_ => die!()
}
}

View file

@ -14,7 +14,7 @@ fn main() {
Some(ref m) => {
msg = m;
},
None => { fail }
None => { die!() }
}
io::println(*msg);
}

View file

@ -2,6 +2,6 @@ fn foo(f: fn() -> !) {}
fn main() {
// Type inference didn't use to be able to handle this:
foo(|| fail);
foo(|| die!());
foo(|| 22); //~ ERROR mismatched types
}

View file

@ -11,6 +11,6 @@
// error-pattern:cannot be dereferenced
fn main() {
match *1 {
_ => { fail; }
_ => { die!(); }
}
}
}

View file

@ -10,4 +10,4 @@
// error-pattern:mismatched types
fn main() { fail 5; }
fn main() { die!(5); }

View file

@ -12,5 +12,5 @@
// error-pattern:unexpected token
fn main() {
fail @ ;
die!(@);
}

View file

@ -9,4 +9,4 @@
// except according to those terms.
// error-pattern:expected `~str` but found `~[int]`
fn main() { fail ~[0i]; }
fn main() { die!(~[0i]); }

View file

@ -14,7 +14,7 @@ trait vec_monad<A> {
impl<A> ~[A]: vec_monad<A> {
fn bind<B>(f: fn(A) -> ~[B]) {
let mut r = fail;
let mut r = die!();
for self.each |elt| { r += f(*elt); }
//~^ WARNING unreachable expression
//~^^ ERROR the type of this value must be known

View file

@ -9,10 +9,10 @@
// except according to those terms.
fn fail_len(v: ~[const int]) -> uint {
let mut i = fail;
let mut i = die!();
for v.each |x| { i += 1u; }
//~^ WARNING unreachable statement
//~^^ ERROR the type of this value must be known
return i;
}
fn main() {}
fn main() {}

View file

@ -16,7 +16,7 @@ trait channel<T> {
// `chan` is not a trait, it's an enum
impl int: chan { //~ ERROR can only implement trait types
fn send(v: int) { fail }
fn send(v: int) { die!() }
}
fn main() {

View file

@ -16,8 +16,8 @@
*/
fn foo() { //~ ERROR this open brace is not closed
match Some(x) {
Some(y) { fail; }
None { fail; }
Some(y) { die!(); }
None { die!(); }
}
fn bar() {

View file

@ -24,7 +24,7 @@ struct E {
}
impl E: A {
fn b<F:Copy, G>(_x: F) -> F { fail } //~ ERROR in method `b`, type parameter 0 has 1 bound, but
fn b<F:Copy, G>(_x: F) -> F { die!() } //~ ERROR in method `b`, type parameter 0 has 1 bound, but
}
fn main() {}
fn main() {}

View file

@ -21,7 +21,7 @@ struct E {
}
impl E: A {
fn b<F:Copy Const, G>(_x: F) -> F { fail } //~ ERROR in method `b`, type parameter 0 has 2 bounds, but
fn b<F:Copy Const, G>(_x: F) -> F { die!() } //~ ERROR in method `b`, type parameter 0 has 2 bounds, but
}
fn main() {}
fn main() {}

View file

@ -22,7 +22,7 @@ struct E {
impl E: A {
// n.b. The error message is awful -- see #3404
fn b<F:Copy, G>(_x: G) -> G { fail } //~ ERROR method `b` has an incompatible type
fn b<F:Copy, G>(_x: G) -> G { die!() } //~ ERROR method `b` has an incompatible type
}
fn main() {}
fn main() {}

View file

@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn uuid() -> uint { fail; }
fn uuid() -> uint { die!(); }
fn from_str(s: ~str) -> uint { fail; }
fn to_str(u: uint) -> ~str { fail; }
fn uuid_random() -> uint { fail; }
fn from_str(s: ~str) -> uint { die!(); }
fn to_str(u: uint) -> ~str { die!(); }
fn uuid_random() -> uint { die!(); }
fn main() {
do uint::range(0, 100000) |_i| { //~ ERROR Do-block body must return bool, but
@ -22,4 +22,4 @@ fn main() {
do uint::range(0, 100000) |_i| { //~ ERROR mismatched types
~"str"
}
}
}

View file

@ -26,7 +26,7 @@ fn siphash(k0 : u64) -> siphash {
//~^ ERROR unresolved name: k0
}
}
fail;
die!();
}
fn main() {}

View file

@ -37,6 +37,6 @@ fn main() {
~Element(ed) => match ed.kind {
~HTMLImageElement(d) if d.image.is_some() => { true }
},
_ => fail ~"WAT" //~ ERROR wat
_ => die!(~"WAT") //~ ERROR wat
};
}

View file

@ -16,7 +16,7 @@ trait PTrait {
impl P: PTrait {
fn getChildOption() -> Option<@P> {
const childVal: @P = self.child.get(); //~ ERROR attempt to use a non-constant value in a constant
fail;
die!();
}
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn g() -> ! { fail; }
fn g() -> ! { die!(); }
fn f() -> ! {
return 42i; //~ ERROR expected `!` but found `int`
g(); //~ WARNING unreachable statement

View file

@ -10,6 +10,6 @@
fn f() -> ! {
return 42i; //~ ERROR expected `!` but found `int`
fail; //~ WARNING unreachable statement
die!(); //~ WARNING unreachable statement
}
fn main() { }

View file

@ -11,7 +11,7 @@
fn send<T: Owned>(ch: _chan<T>, -data: T) {
log(debug, ch);
log(debug, data);
fail;
die!();
}
enum _chan<T> = int;
@ -23,4 +23,4 @@ fn test00_start(ch: _chan<~int>, message: ~int, _count: ~int) {
log(debug, message); //~ ERROR use of moved value: `message`
}
fn main() { fail; }
fn main() { die!(); }

View file

@ -16,8 +16,8 @@ enum u { c, d }
fn main() {
let x = a(c);
match x {
a(d) => { fail ~"hello"; }
b => { fail ~"goodbye"; }
a(d) => { die!(~"hello"); }
b => { die!(~"goodbye"); }
}
}

View file

@ -14,6 +14,6 @@ fn main() {
Some(copy z) => { //~ ERROR copying a noncopyable value
do z.with |b| { assert !*b; }
}
None => fail
None => die!()
}
}

View file

@ -13,7 +13,7 @@
// unrelated errors.
fn foo(a: int, b: int, c: int, d:int) {
fail;
die!();
}
fn main() {

View file

@ -17,6 +17,6 @@ use option::Some;
enum bar { t1((), Option<~[int]>), t2, }
fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail; } } }
fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { die!(); } } }
fn main() { }

View file

@ -21,7 +21,7 @@ fn foo(t: bar) {
t1(_, Some::<int>(x)) => {
log(debug, x);
}
_ => { fail; }
_ => { die!(); }
}
}

View file

@ -63,6 +63,6 @@ fn main() {
}
fn check_pp<T>(expr: T, f: fn(pprust::ps, T), expect: str) {
fail;
die!();
}

View file

@ -58,6 +58,6 @@ fn main() {
}
fn check_pp<T>(expr: T, f: fn(pprust::ps, T), expect: str) {
fail;
die!();
}

View file

@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn of<T>() -> @fn(T) { fail; }
fn subtype<T>(x: @fn(T)) { fail; }
fn of<T>() -> @fn(T) { die!(); }
fn subtype<T>(x: @fn(T)) { die!(); }
fn test_fn<T>(_x: &x/T, _y: &y/T, _z: &z/T) {
// Here, x, y, and z are free. Other letters

View file

@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn of<T>() -> @fn(T) { fail; }
fn subtype<T>(x: @fn(T)) { fail; }
fn of<T>() -> @fn(T) { die!(); }
fn subtype<T>(x: @fn(T)) { die!(); }
fn test_fn<T>(_x: &x/T, _y: &y/T, _z: &z/T) {
// Here, x, y, and z are free. Other letters
@ -54,4 +54,4 @@ fn test_fn<T>(_x: &x/T, _y: &y/T, _z: &z/T) {
of::<fn(&a/T) -> @fn(&a/T)>());
}
fn main() {}
fn main() {}

View file

@ -16,7 +16,7 @@
extern mod core;
fn last<T>(v: ~[const &T]) -> core::Option<T> {
fail;
die!();
}
fn main() {

View file

@ -14,4 +14,4 @@ enum quux<T> { bar }
fn foo(c: quux) { assert (false); }
fn main() { fail; }
fn main() { die!(); }

View file

@ -16,5 +16,5 @@ extern mod xx {
fn main() {
// let it fail to verify warning message
fail
die!()
}

View file

@ -8,6 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn f() { if (1 == fail) { } else { } }
fn f() { if (1 == die!()) { } else { } }
fn main() { }
fn main() { }

View file

@ -14,6 +14,6 @@ fn foo(s: ~str) { }
fn main() {
let i =
match Some::<int>(3) { None::<int> => { fail } Some::<int>(_) => { fail } };
match Some::<int>(3) { None::<int> => { die!() } Some::<int>(_) => { die!() } };
foo(i);
}

View file

@ -9,6 +9,6 @@
// except according to those terms.
// error-pattern:quux
fn f() -> ! { fail ~"quux" }
fn f() -> ! { die!(~"quux") }
fn g() -> int { match f() { true => { 1 } false => { 0 } } }
fn main() { g(); }

View file

@ -11,9 +11,9 @@
// error-pattern:squirrelcupcake
fn cmp() -> int {
match (option::Some('a'), option::None::<char>) {
(option::Some(_), _) => { fail ~"squirrelcupcake"; }
(_, option::Some(_)) => { fail; }
_ => { fail ~"wat"; }
(option::Some(_), _) => { die!(~"squirrelcupcake"); }
(_, option::Some(_)) => { die!(); }
_ => { die!(~"wat"); }
}
}

View file

@ -9,6 +9,6 @@
// except according to those terms.
// error-pattern:meep
fn f(a: int, b: int, c: @int) { fail ~"moop"; }
fn f(a: int, b: int, c: @int) { die!(~"moop"); }
fn main() { f(1, fail ~"meep", @42); }
fn main() { f(1, die!(~"meep"), @42); }

View file

@ -9,5 +9,5 @@
// except according to those terms.
// error-pattern:quux
fn my_err(s: ~str) -> ! { log(error, s); fail ~"quux"; }
fn my_err(s: ~str) -> ! { log(error, s); die!(~"quux"); }
fn main() { 3u == my_err(~"bye"); }

View file

@ -9,5 +9,5 @@
// except according to those terms.
// error-pattern:quux
fn my_err(s: ~str) -> ! { log(error, s); fail ~"quux"; }
fn my_err(s: ~str) -> ! { log(error, s); die!(~"quux"); }
fn main() { 3u == my_err(~"bye"); }

View file

@ -16,6 +16,6 @@ type port_id = int;
enum chan_t<T> = {task: task_id, port: port_id};
fn send<T: Owned>(ch: chan_t<T>, data: T) { fail; }
fn send<T: Owned>(ch: chan_t<T>, data: T) { die!(); }
fn main() { fail ~"quux"; }
fn main() { die!(~"quux"); }

View file

@ -10,6 +10,6 @@
//error-pattern:One
fn main() {
fail ~"One";
fail ~"Two";
}
die!(~"One");
die!(~"Two");
}

View file

@ -10,5 +10,5 @@
// error-pattern:wooooo
fn main() {
let mut a = 1; if 1 == 1 { a = 2; } fail ~"woooo" + ~"o";
let mut a = 1; if 1 == 1 { a = 2; } die!(~"woooo" + ~"o");
}

View file

@ -12,4 +12,4 @@
// error-pattern:explicit
fn main() { fail; }
fn main() { die!(); }

View file

@ -12,7 +12,7 @@
// error-pattern:explicit failure
fn f() -> ! { fail }
fn f() -> ! { die!() }
fn g() -> int { let x = match true { true => { f() } false => { 10 } }; return x; }

View file

@ -12,4 +12,4 @@
// error-pattern:explicit failure
fn main() { let x = match true { false => { 0 } true => { fail } }; }
fn main() { let x = match true { false => { 0 } true => { die!() } }; }

View file

@ -12,6 +12,6 @@
// error-pattern:explicit failure
fn f() -> ! { fail }
fn f() -> ! { die!() }
fn main() { f(); }

View file

@ -12,7 +12,7 @@
// error-pattern:explicit failure
fn f() -> ! { fail }
fn f() -> ! { die!() }
fn g() -> int { let x = if true { f() } else { 10 }; return x; }

View file

@ -12,4 +12,4 @@
// error-pattern:explicit failure
fn main() { let x = if false { 0 } else if true { fail } else { 10 }; }
fn main() { let x = if false { 0 } else if true { die!() } else { 10 }; }

View file

@ -37,7 +37,7 @@ fn main() {
do task::spawn {
let result = count(5u);
debug!("result = %?", result);
fail;
die!();
};
}
}

View file

@ -10,4 +10,4 @@
// error-pattern:moop
extern mod std;
fn main() { fail ~"moop"; }
fn main() { die!(~"moop"); }

View file

@ -11,4 +11,4 @@
// error-pattern:meh
extern mod std;
fn main() { let str_var: ~str = ~"meh"; fail fmt!("%s", str_var); }
fn main() { let str_var: ~str = ~"meh"; die!(fmt!("%s", str_var)); }

View file

@ -10,4 +10,4 @@
// error-pattern:moop
extern mod std;
fn main() { for uint::range(0u, 10u) |_i| { fail ~"moop"; } }
fn main() { for uint::range(0u, 10u) |_i| { die!(~"moop"); } }

View file

@ -19,7 +19,7 @@ fn foo(x: uint) {
if even(x) {
log(debug, x);
} else {
fail ~"Number is odd";
die!(~"Number is odd");
}
}

View file

@ -9,5 +9,5 @@
// except according to those terms.
// error-pattern:quux
fn my_err(s: ~str) -> ! { log(error, s); fail ~"quux"; }
fn my_err(s: ~str) -> ! { log(error, s); die!(~"quux"); }
fn main() { if my_err(~"bye") { } }

View file

@ -15,6 +15,6 @@ use io::ReaderUtil;
fn main() {
do io::with_str_reader(~"") |rdr| {
match rdr.read_char() { '=' => { } _ => { fail } }
match rdr.read_char() { '=' => { } _ => { die!() } }
}
}

View file

@ -22,5 +22,5 @@ fn main() {
},
a: ~0
};
fail;
}
die!();
}

View file

@ -11,7 +11,7 @@
// error-pattern:so long
fn main() {
let x = ~[], y = ~[3];
fail ~"so long";
die!(~"so long");
x += y;
~"good" + ~"bye";
}

View file

@ -12,7 +12,7 @@
// error-pattern:fail
fn child() { fail; }
fn child() { die!(); }
fn main() {
let (p, _c) = pipes::stream::<()>();

View file

@ -12,7 +12,7 @@
// error-pattern:fail
fn grandchild() { fail ~"grandchild dies"; }
fn grandchild() { die!(~"grandchild dies"); }
fn child() {
let (p, _c) = pipes::stream::<int>();

View file

@ -8,15 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:explicit failure
// error-pattern:fail
fn getbig(i: int) {
if i != 0 {
getbig(i - 1);
} else {
fail;
die!();
}
}
fn main() {
getbig(100000);
}
}

View file

@ -27,7 +27,7 @@ fn getbig_call_c_and_fail(i: int) {
} else {
unsafe {
rustrt::last_os_error();
fail;
die!();
}
}
}

View file

@ -19,7 +19,7 @@ fn getbig_and_fail(&&i: int) {
if i != 0 {
getbig_and_fail(i - 1);
} else {
fail;
die!();
}
}

View file

@ -19,7 +19,7 @@ fn getbig_and_fail(&&i: int) {
if i != 0 {
getbig_and_fail(i - 1);
} else {
fail;
die!();
}
}

View file

@ -14,4 +14,4 @@
struct T { t: ~str }
fn main() { let pth = fail ~"bye"; let rs: T = T {t: pth}; }
fn main() { let pth = die!(~"bye"); let rs: T = T {t: pth}; }

View file

@ -12,7 +12,7 @@
// error-pattern:[...]
fn main() {
fail ~"\
die!(~"\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
@ -70,5 +70,5 @@ fn main() {
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
";
");
}

View file

@ -16,5 +16,5 @@ fn main() {
// normally. In this case we're going to fail, so instead of of
// returning 50 the process will return the typical rt failure code.
os::set_exit_status(50);
fail;
}
die!();
}

View file

@ -34,5 +34,5 @@ fn main() {
do task::spawn {
let i = r(5);
};
fail;
die!();
}

View file

@ -17,5 +17,5 @@ mod m {
pub fn exported() { }
#[test]
fn unexported() { fail ~"runned an unexported test"; }
fn unexported() { die!(~"runned an unexported test"); }
}

View file

@ -15,7 +15,7 @@ extern mod std;
// We don't want to see any invalid reads
fn main() {
fn f() {
fail;
die!();
}
task::spawn(|| f() );
}
}

View file

@ -12,7 +12,7 @@
fn goodfail() {
task::yield();
fail ~"goodfail";
die!(~"goodfail");
}
fn main() {

View file

@ -15,10 +15,10 @@ fn test_box() {
}
fn test_str() {
let res = match false { true => { ~"happy" },
_ => fail ~"non-exhaustive match failure" };
_ => die!(~"non-exhaustive match failure") };
assert res == ~"happy";
}
fn main() {
test_box();
test_str();
}
}

View file

@ -11,7 +11,7 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
fn main() {

View file

@ -11,7 +11,7 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
fn main() {

View file

@ -11,7 +11,7 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
struct r {

View file

@ -11,11 +11,11 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
fn main() {
let x = @~"hi";
failfn();
log(error, x);
}
}

View file

@ -11,7 +11,7 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
trait i {
@ -26,4 +26,4 @@ fn main() {
let x = ~0 as i;
failfn();
log(error, x);
}
}

View file

@ -11,11 +11,11 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
fn main() {
let x = @~~0;
failfn();
log(error, x);
}
}

View file

@ -11,11 +11,11 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
fn main() {
let x = @~0;
failfn();
log(error, x);
}
}

View file

@ -11,11 +11,11 @@
// error-pattern:fail
fn failfn() {
fail;
die!();
}
fn main() {
let x = @~[0, 1, 2, 3, 4, 5];
failfn();
log(error, x);
}
}

Some files were not shown because too many files have changed in this diff Show more