]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/use-uninit-match.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[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); }