rust/src/test/run-pass/regions-nullary-variant.rs

9 lines
124 B
Rust
Raw Normal View History

2012-04-21 12:04:58 -05:00
enum roption/& {
a, b(&uint)
}
fn mk(cond: bool, ptr: &uint) -> roption {
if cond {a} else {b(ptr)}
}
fn main() {}