rust/src/test/run-pass/expr-if-unique.rs

13 lines
188 B
Rust
Raw Normal View History

// -*- rust -*-
// Tests for if as expressions returning boxed types
fn test_box() {
let rs = if true { ~100 } else { ~101 };
assert (*rs == 100);
}
fn main() { test_box(); }