blob: 9102730629b98812947bea56d35ea9a62de68d6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// run-pass
#![allow(dead_code)]
#![allow(unused_mut)]
#![allow(non_camel_case_types)]
fn foo<T>(o: myoption<T>) -> isize {
let mut x: isize;
match o {
myoption::none::<T> => { panic!(); }
myoption::some::<T>(_t) => { x = 5; }
}
return x;
}
enum myoption<T> { none, some(T), }
pub fn main() { println!("{}", 5); }
|