Skip to content

Commit 888ee60

Browse files
authored
metrics: properly annotate required features for 64-bit-only metrics (#7449)
1 parent 7dd4d8a commit 888ee60

File tree

2 files changed

+560
-523
lines changed

2 files changed

+560
-523
lines changed

tokio/src/macros/cfg.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
#![allow(unused_macros)]
22

3+
/// Allows specifying arbitrary combinations of features and config flags,
4+
/// which are also propagated to `docsrs` config.
5+
///
6+
/// Each contained item will have the annotations applied
7+
///
8+
/// ## Example usage:
9+
/// ```no-compile
10+
/// feature! {
11+
/// #![any(
12+
/// feature = "process",
13+
/// feature = "sync",
14+
/// feature = "rt",
15+
/// tokio_unstable
16+
/// )]
17+
/// /// docs
18+
/// pub struct MyStruct {};
19+
/// /// docs
20+
/// pub struct AnotherStruct {};
21+
/// }
22+
/// ```
23+
///
324
macro_rules! feature {
425
(
526
#![$meta:meta]

0 commit comments

Comments
 (0)