Skip to content

Commit 730b77a

Browse files
committed
tokio-macros: add dummy main to disabled doctest blocks
1 parent 44a31b1 commit 730b77a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tokio-macros/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ use proc_macro::TokenStream;
8686
/// # #[cfg(tokio_unstable)]
8787
/// #[tokio::main(flavor = "local")]
8888
/// # async fn main() {}
89+
/// # #[cfg(not(tokio_unstable))]
90+
/// # fn main() {}
8991
/// ```
9092
///
9193
/// # Function arguments
@@ -155,6 +157,8 @@ use proc_macro::TokenStream;
155157
/// async fn main() {
156158
/// println!("Hello world");
157159
/// }
160+
/// # #[cfg(not(tokio_unstable))]
161+
/// # fn main() {}
158162
/// ```
159163
///
160164
/// Equivalent code not using `#[tokio::main]`
@@ -170,6 +174,8 @@ use proc_macro::TokenStream;
170174
/// println!("Hello world");
171175
/// })
172176
/// }
177+
/// # #[cfg(not(tokio_unstable))]
178+
/// # fn main() {}
173179
/// ```
174180
///
175181
///

0 commit comments

Comments
 (0)