about summary refs log tree commit diff
path: root/tests/ui/regions/regions-nullary-variant.rs
blob: 24c5c6765a86cb3d74512e5e362b800120a42d72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]


enum roption<'a> {
    a, b(&'a usize)
}

fn mk(cond: bool, ptr: &usize) -> roption<'_> {
    if cond {roption::a} else {roption::b(ptr)}
}

pub fn main() {}