1 // compile-flags: --cfg something
4 #![feature(async_await, async_closure, param_attrs)]
5 #![deny(unused_variables)]
9 #[cfg(nothing)] a: i32,
10 #[cfg(something)] b: i32,
11 #[cfg_attr(something, cfg(nothing))] c: i32,
12 #[cfg_attr(nothing, cfg(nothing))] ...
17 #[cfg(nothing)] a: i32,
18 #[cfg(something)] b: i32,
19 #[cfg_attr(nothing, cfg(nothing))] c: i32,
20 #[cfg_attr(something, cfg(nothing))] d: i32,
24 #[cfg(something)] a: i32,
25 //~^ ERROR unused variable: `a`
26 #[cfg(nothing)] b: i32,
29 #[cfg(nothing)] a: i32,
30 #[cfg(something)] b: i32,
31 //~^ ERROR unused variable: `b`
32 #[cfg_attr(nothing, cfg(nothing))] c: i32,
33 //~^ ERROR unused variable: `c`
34 #[cfg_attr(something, cfg(nothing))] d: i32,
41 #[cfg(something)] a: i32,
42 //~^ ERROR unused variable: `a`
43 #[cfg(nothing)] b: i32,
47 #[cfg(nothing)] a: i32,
48 #[cfg(something)] b: i32,
49 //~^ ERROR unused variable: `b`
50 #[cfg_attr(nothing, cfg(nothing))] c: i32,
51 //~^ ERROR unused variable: `c`
52 #[cfg_attr(something, cfg(nothing))] d: i32,
58 #[cfg(nothing)] a: i32,
59 #[cfg(something)] b: i32,
60 //~^ ERROR unused variable: `b`
61 #[cfg_attr(nothing, cfg(nothing))] c: i32,
62 //~^ ERROR unused variable: `c`
63 #[cfg_attr(something, cfg(nothing))] d: i32,
66 impl RefTrait for RefStruct {
69 #[cfg(nothing)] a: i32,
70 #[cfg(something)] b: i32,
71 //~^ ERROR unused variable: `b`
72 #[cfg_attr(nothing, cfg(nothing))] c: i32,
73 //~^ ERROR unused variable: `c`
74 #[cfg_attr(something, cfg(nothing))] d: i32,
79 let _: unsafe extern "C" fn(_, ...) = ffi;
80 let _: fn(_, _) = foo;
81 let _: FnType = |_, _| {};
83 #[cfg(something)] a: i32,
84 //~^ ERROR unused variable: `a`
85 #[cfg(nothing)] b: i32,
88 #[cfg(nothing)] a: i32,
89 #[cfg(something)] b: i32,
90 //~^ ERROR unused variable: `b`
91 #[cfg_attr(nothing, cfg(nothing))] c: i32,
92 //~^ ERROR unused variable: `c`
93 #[cfg_attr(something, cfg(nothing))] d: i32,