2012-12-10 19:32:48 -06:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2011-06-14 15:58:10 -05:00
|
|
|
// error-pattern:explicit failure
|
2011-05-26 22:14:00 -05:00
|
|
|
|
2014-04-14 10:30:31 -05:00
|
|
|
#![allow(unreachable_code)]
|
|
|
|
#![allow(unused_variable)]
|
2013-08-17 10:37:42 -05:00
|
|
|
|
2014-05-22 18:57:53 -05:00
|
|
|
fn foo(s: String) { }
|
2011-05-26 22:14:00 -05:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-19 17:16:48 -05:00
|
|
|
let i =
|
2013-10-21 15:08:31 -05:00
|
|
|
match Some::<int>(3) { None::<int> => { fail!() } Some::<int>(_) => { fail!() } };
|
2011-06-15 13:19:50 -05:00
|
|
|
foo(i);
|
2011-08-13 02:10:18 -05:00
|
|
|
}
|