6
6
///
7
7
/// This allows you to conveniently provide a long list #[cfg]'d blocks of code
8
8
/// without having to rewrite each clause multiple times.
9
- #[ allow( unused_macros) ]
10
9
macro_rules! cfg_if {
11
10
// match if/else chains with a final `else`
12
11
( $(
@@ -62,7 +61,6 @@ macro_rules! cfg_if {
62
61
} ;
63
62
}
64
63
65
- #[ allow( unused_macros, unused_macro_rules) ]
66
64
macro_rules! s {
67
65
( $( $( #[ $attr: meta] ) * pub $t: ident $i: ident { $( $field: tt) * } ) * ) => ( $(
68
66
s!( it: $( #[ $attr] ) * pub $t $i { $( $field) * } ) ;
@@ -87,7 +85,6 @@ macro_rules! s {
87
85
) ;
88
86
}
89
87
90
- #[ allow( unused_macros) ]
91
88
macro_rules! s_no_extra_traits {
92
89
( $( $( #[ $attr: meta] ) * pub $t: ident $i: ident { $( $field: tt) * } ) * ) => ( $(
93
90
s_no_extra_traits!( it: $( #[ $attr] ) * pub $t $i { $( $field) * } ) ;
@@ -123,7 +120,6 @@ macro_rules! s_no_extra_traits {
123
120
) ;
124
121
}
125
122
126
- #[ allow( unused_macros) ]
127
123
macro_rules! e {
128
124
( $( $( #[ $attr: meta] ) * pub enum $i: ident { $( $field: tt) * } ) * ) => ( $(
129
125
__item! {
@@ -138,7 +134,6 @@ macro_rules! e {
138
134
) * ) ;
139
135
}
140
136
141
- #[ allow( unused_macros) ]
142
137
macro_rules! s_paren {
143
138
( $( $( #[ $attr: meta] ) * pub struct $i: ident ( $( $field: tt) * ) ; ) * ) => ( $(
144
139
__item! {
@@ -182,7 +177,6 @@ macro_rules! s_paren {
182
177
// 'f!' block
183
178
cfg_if ! {
184
179
if #[ cfg( libc_const_extern_fn) ] {
185
- #[ allow( unused_macros) ]
186
180
macro_rules! f {
187
181
( $( $( #[ $attr: meta] ) * pub $( { $constness: ident} ) * fn $i: ident(
188
182
$( $arg: ident: $argty: ty) , *
@@ -198,7 +192,6 @@ cfg_if! {
198
192
) * )
199
193
}
200
194
201
- #[ allow( unused_macros) ]
202
195
macro_rules! safe_f {
203
196
( $( $( #[ $attr: meta] ) * pub $( { $constness: ident} ) * fn $i: ident(
204
197
$( $arg: ident: $argty: ty) , *
@@ -214,7 +207,6 @@ cfg_if! {
214
207
) * )
215
208
}
216
209
217
- #[ allow( unused_macros) ]
218
210
macro_rules! const_fn {
219
211
( $( $( #[ $attr: meta] ) * $( { $constness: ident} ) * fn $i: ident(
220
212
$( $arg: ident: $argty: ty) , *
@@ -231,7 +223,6 @@ cfg_if! {
231
223
}
232
224
233
225
} else {
234
- #[ allow( unused_macros) ]
235
226
macro_rules! f {
236
227
( $( $( #[ $attr: meta] ) * pub $( { $constness: ident} ) * fn $i: ident(
237
228
$( $arg: ident: $argty: ty) , *
@@ -247,7 +238,6 @@ cfg_if! {
247
238
) * )
248
239
}
249
240
250
- #[ allow( unused_macros) ]
251
241
macro_rules! safe_f {
252
242
( $( $( #[ $attr: meta] ) * pub $( { $constness: ident} ) * fn $i: ident(
253
243
$( $arg: ident: $argty: ty) , *
@@ -263,7 +253,6 @@ cfg_if! {
263
253
) * )
264
254
}
265
255
266
- #[ allow( unused_macros) ]
267
256
macro_rules! const_fn {
268
257
( $( $( #[ $attr: meta] ) * $( { $constness: ident} ) * fn $i: ident(
269
258
$( $arg: ident: $argty: ty) , *
@@ -281,14 +270,12 @@ cfg_if! {
281
270
}
282
271
}
283
272
284
- #[ allow( unused_macros) ]
285
273
macro_rules! __item {
286
274
( $i: item) => {
287
275
$i
288
276
} ;
289
277
}
290
278
291
- #[ allow( unused_macros) ]
292
279
macro_rules! align_const {
293
280
( $( $( #[ $attr: meta] ) *
294
281
pub const $name: ident : $t1: ty
@@ -308,7 +295,6 @@ macro_rules! align_const {
308
295
}
309
296
310
297
// This macro is used to deprecate items that should be accessed via the mach2 crate
311
- #[ allow( unused_macros) ]
312
298
macro_rules! deprecated_mach {
313
299
( pub const $id: ident: $ty: ty = $expr: expr; ) => {
314
300
#[ deprecated(
@@ -342,15 +328,13 @@ macro_rules! deprecated_mach {
342
328
}
343
329
}
344
330
345
- #[ allow( unused_macros) ]
346
331
#[ cfg( not( libc_ptr_addr_of) ) ]
347
332
macro_rules! ptr_addr_of {
348
333
( $place: expr) => {
349
334
& $place
350
335
} ;
351
336
}
352
337
353
- #[ allow( unused_macros) ]
354
338
#[ cfg( libc_ptr_addr_of) ]
355
339
macro_rules! ptr_addr_of {
356
340
( $place: expr) => {
0 commit comments