2 // compile-flags: --cfg something
5 #![feature(param_attrs)]
9 #[allow(unused_mut)] a: i32,
10 #[cfg(something)] b: i32,
11 #[cfg_attr(something, cfg(nothing))] c: i32,
12 #[deny(unused_mut)] d: i32,
13 #[forbid(unused_mut)] #[warn(unused_mut)] ...
18 #[allow(unused_mut)] a: i32,
19 #[cfg(something)] b: i32,
20 #[cfg_attr(something, cfg(nothing))] c: i32,
21 #[deny(unused_mut)] d: i32,
22 #[forbid(unused_mut)] #[warn(unused_mut)] e: i32
26 #[allow(unused_mut)] a: i32,
27 #[cfg(something)] b: i32,
28 #[cfg_attr(something, cfg(nothing))] c: i32,
29 #[deny(unused_mut)] d: i32,
30 #[forbid(unused_mut)] #[warn(unused_mut)] _e: i32
38 #[allow(unused_mut)] self,
39 #[cfg(something)] a: i32,
40 #[cfg_attr(something, cfg(nothing))]
41 #[deny(unused_mut)] b: i32,
48 #[allow(unused_mut)] &self,
49 #[cfg(something)] a: i32,
50 #[cfg_attr(something, cfg(nothing))]
51 #[deny(unused_mut)] b: i32,
56 #[forbid(unused_mut)] &self,
57 #[warn(unused_mut)] a: i32
60 impl RefTrait for RefStruct {
62 #[forbid(unused_mut)] &self,
63 #[warn(unused_mut)] a: i32
69 struct BoxSelfStruct {}
72 #[allow(unused_mut)] self: Box<Self>,
73 #[cfg(something)] a: i32,
74 #[cfg_attr(something, cfg(nothing))]
75 #[deny(unused_mut)] b: i32,
80 #[forbid(unused_mut)] self: Box<Self>,
81 #[warn(unused_mut)] a: i32
84 impl BoxSelfTrait for BoxSelfStruct {
86 #[forbid(unused_mut)] self: Box<Self>,
87 #[warn(unused_mut)] a: i32
92 let _: unsafe extern "C" fn(_, _, _, ...) = ffi;
93 let _: fn(_, _, _, _) = foo;
94 let _: FnType = |_, _, _, _| {};
96 #[allow(unused_mut)] a: u32,
97 #[cfg(something)] b: i32,
98 #[cfg_attr(something, cfg(nothing))]
99 #[deny(unused_mut)] c: i32,