]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unique/unique-in-tag.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[rust.git] / src / test / ui / unique / unique-in-tag.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4
5 fn test1() {
6     enum bar { u(Box<isize>), w(isize), }
7
8     let x = bar::u(Box::new(10));
9     assert!(match x {
10       bar::u(a) => {
11         println!("{}", a);
12         *a
13       }
14       _ => { 66 }
15     } == 10);
16 }
17
18 pub fn main() {
19     test1();
20 }