rust/tests/ui/regions/regions-nullary-variant.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
253 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
enum roption<'a> {
a, b(&'a usize)
2012-04-21 17:04:58 +00:00
}
fn mk(cond: bool, ptr: &usize) -> roption {
if cond {roption::a} else {roption::b(ptr)}
2012-04-21 17:04:58 +00:00
}
pub fn main() {}