1 // compile-flags: --cfg something
4 #![feature(async_closure)]
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,
54 fn issue_64682_associated_fn(
55 #[cfg(nothing)] a: i32,
56 #[cfg(something)] b: i32,
57 //~^ ERROR unused variable: `b`
58 #[cfg_attr(nothing, cfg(nothing))] c: i32,
59 //~^ ERROR unused variable: `c`
60 #[cfg_attr(something, cfg(nothing))] d: i32,
66 #[cfg(nothing)] a: i32,
67 #[cfg(something)] b: i32,
68 //~^ ERROR unused variable: `b`
69 #[cfg_attr(nothing, cfg(nothing))] c: i32,
70 //~^ ERROR unused variable: `c`
71 #[cfg_attr(something, cfg(nothing))] d: i32,
73 fn issue_64682_associated_fn(
74 #[cfg(nothing)] a: i32,
75 #[cfg(something)] b: i32,
76 //~^ ERROR unused variable: `b`
77 #[cfg_attr(nothing, cfg(nothing))] c: i32,
78 //~^ ERROR unused variable: `c`
79 #[cfg_attr(something, cfg(nothing))] d: i32,
82 impl RefTrait for RefStruct {
85 #[cfg(nothing)] a: i32,
86 #[cfg(something)] b: i32,
87 //~^ ERROR unused variable: `b`
88 #[cfg_attr(nothing, cfg(nothing))] c: i32,
89 //~^ ERROR unused variable: `c`
90 #[cfg_attr(something, cfg(nothing))] d: i32,
92 fn issue_64682_associated_fn(
93 #[cfg(nothing)] a: i32,
94 #[cfg(something)] b: i32,
95 //~^ ERROR unused variable: `b`
96 #[cfg_attr(nothing, cfg(nothing))] c: i32,
97 //~^ ERROR unused variable: `c`
98 #[cfg_attr(something, cfg(nothing))] d: i32,
103 let _: unsafe extern "C" fn(_, ...) = ffi;
104 let _: fn(_, _) = foo;
105 let _: FnType = |_, _| {};
107 #[cfg(something)] a: i32,
108 //~^ ERROR unused variable: `a`
109 #[cfg(nothing)] b: i32,
112 #[cfg(nothing)] a: i32,
113 #[cfg(something)] b: i32,
114 //~^ ERROR unused variable: `b`
115 #[cfg_attr(nothing, cfg(nothing))] c: i32,
116 //~^ ERROR unused variable: `c`
117 #[cfg_attr(something, cfg(nothing))] d: i32,