]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-11085.rs
Rollup merge of #107114 - Erk-:add-absolute-note-to-path-join, r=m-ou-se
[rust.git] / tests / ui / issues / issue-11085.rs
1 // run-pass
2 #![allow(dead_code)]
3 // compile-flags: --cfg foo
4
5 // pretty-expanded FIXME #23616
6
7 struct Foo {
8     #[cfg(fail)]
9     bar: baz,
10     foo: isize,
11 }
12
13 struct Foo2 {
14     #[cfg(foo)]
15     foo: isize,
16 }
17
18 enum Bar1 {
19     Bar1_1,
20     #[cfg(fail)]
21     Bar1_2(NotAType),
22 }
23
24 enum Bar2 {
25     #[cfg(fail)]
26     Bar2_1(NotAType),
27 }
28
29 enum Bar3 {
30     Bar3_1 {
31         #[cfg(fail)]
32         foo: isize,
33         bar: isize,
34     }
35 }
36
37 pub fn main() {
38     let _f = Foo { foo: 3 };
39     let _f = Foo2 { foo: 3 };
40
41     match Bar1::Bar1_1 {
42         Bar1::Bar1_1 => {}
43     }
44
45     let _f = Bar3::Bar3_1 { bar: 3 };
46 }