mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
15 lines
290 B
Rust
15 lines
290 B
Rust
//@ run-pass
|
|
|
|
|
|
fn test_simple() {
|
|
let r = match true { true => { true } false => { panic!() } };
|
|
assert_eq!(r, true);
|
|
}
|
|
|
|
fn test_box() {
|
|
let r = match true { true => { vec![10] } false => { panic!() } };
|
|
assert_eq!(r[0], 10);
|
|
}
|
|
|
|
pub fn main() { test_simple(); test_box(); }
|