]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/use-uninit-match.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / binding / use-uninit-match.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4
5
6 fn foo<T>(o: myoption<T>) -> isize {
7     let mut x: isize = 5;
8     match o {
9         myoption::none::<T> => { }
10         myoption::some::<T>(_t) => { x += 1; }
11     }
12     return x;
13 }
14
15 enum myoption<T> { none, some(T), }
16
17 pub fn main() { println!("{}", 5); }