]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-21033.rs
Enable full revision in const generics ui tests
[rust.git] / src / test / ui / issues / issue-21033.rs
1 // run-pass
2 #![allow(unused_mut)]
3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
5
6 #![feature(box_patterns)]
7 #![feature(box_syntax)]
8
9 enum E {
10     StructVar { boxed: Box<i32> }
11 }
12
13 fn main() {
14
15     // Test matching each shorthand notation for field patterns.
16     let mut a = E::StructVar { boxed: box 3 };
17     match a {
18         E::StructVar { box boxed } => { }
19     }
20     match a {
21         E::StructVar { box ref boxed } => { }
22     }
23     match a {
24         E::StructVar { box mut boxed } => { }
25     }
26     match a {
27         E::StructVar { box ref mut boxed } => { }
28     }
29     match a {
30         E::StructVar { ref boxed } => { }
31     }
32     match a {
33         E::StructVar { ref mut boxed } => { }
34     }
35     match a {
36         E::StructVar { mut boxed } => { }
37     }
38
39     // Test matching non shorthand notation. Recreate a since last test
40     // moved `boxed`
41     let mut a = E::StructVar { boxed: box 3 };
42     match a {
43         E::StructVar { boxed: box ref mut num } => { }
44     }
45     match a {
46         E::StructVar { boxed: ref mut num } => { }
47     }
48
49 }