1 // compile-flags: --cfg something
3 #![feature(param_attrs)]
4 #![deny(unused_variables)]
8 #[cfg(nothing)] a: i32,
9 #[cfg(something)] b: i32,
10 #[cfg_attr(something, cfg(nothing))] c: i32,
11 #[cfg_attr(nothing, cfg(nothing))] ...
16 #[cfg(nothing)] a: i32,
17 #[cfg(something)] b: i32,
18 #[cfg_attr(nothing, cfg(nothing))] c: i32,
19 #[cfg_attr(something, cfg(nothing))] d: i32,
23 #[cfg(nothing)] a: i32,
24 #[cfg(something)] b: i32,
25 //~^ ERROR unused variable: `b` [unused_variables]
26 #[cfg_attr(nothing, cfg(nothing))] c: i32,
27 //~^ ERROR unused variable: `c` [unused_variables]
28 #[cfg_attr(something, cfg(nothing))] d: i32,
35 #[cfg(nothing)] a: i32,
36 #[cfg(something)] b: i32,
37 //~^ ERROR unused variable: `b` [unused_variables]
38 #[cfg_attr(nothing, cfg(nothing))] c: i32,
39 //~^ ERROR unused variable: `c` [unused_variables]
40 #[cfg_attr(something, cfg(nothing))] d: i32,
46 #[cfg(nothing)] a: i32,
47 #[cfg(something)] b: i32,
48 //~^ ERROR unused variable: `b` [unused_variables]
49 #[cfg_attr(nothing, cfg(nothing))] c: i32,
50 //~^ ERROR unused variable: `c` [unused_variables]
51 #[cfg_attr(something, cfg(nothing))] d: i32,
54 impl RefTrait for RefStruct {
57 #[cfg(nothing)] a: i32,
58 #[cfg(something)] b: i32,
59 //~^ ERROR unused variable: `b` [unused_variables]
60 #[cfg_attr(nothing, cfg(nothing))] c: i32,
61 //~^ ERROR unused variable: `c` [unused_variables]
62 #[cfg_attr(something, cfg(nothing))] d: i32,
67 let _: unsafe extern "C" fn(_, ...) = ffi;
68 let _: fn(_, _) = foo;
69 let _: FnType = |_, _| {};
71 #[cfg(nothing)] a: i32,
72 #[cfg(something)] b: i32,
73 //~^ ERROR unused variable: `b` [unused_variables]
74 #[cfg_attr(nothing, cfg(nothing))] c: i32,
75 //~^ ERROR unused variable: `c` [unused_variables]
76 #[cfg_attr(something, cfg(nothing))] d: i32,