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

9 lines
122 B
Rust
Raw Normal View History

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