File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ use proc_macro::TokenStream;
71
71
/// To use the single-threaded runtime known as the `current_thread` runtime,
72
72
/// the macro can be configured using
73
73
///
74
- /// ```
74
+ /// ```rust
75
75
/// #[tokio::main(flavor = "current_thread")]
76
76
/// # async fn main() {}
77
77
/// ```
@@ -82,7 +82,8 @@ use proc_macro::TokenStream;
82
82
///
83
83
/// To use the [local runtime], the macro can be configured using
84
84
///
85
- /// ```ignore
85
+ /// ```rust
86
+ /// # #[cfg(tokio_unstable)]
86
87
/// #[tokio::main(flavor = "local")]
87
88
/// # async fn main() {}
88
89
/// ```
@@ -148,7 +149,8 @@ use proc_macro::TokenStream;
148
149
/// The [local runtime] is similar to the current-thread runtime but
149
150
/// supports [`task::spawn_local`](../tokio/task/fn.spawn_local.html).
150
151
///
151
- /// ```ignore
152
+ /// ```rust
153
+ /// # #[cfg(tokio_unstable)]
152
154
/// #[tokio::main(flavor = "local")]
153
155
/// async fn main() {
154
156
/// println!("Hello world");
@@ -157,7 +159,8 @@ use proc_macro::TokenStream;
157
159
///
158
160
/// Equivalent code not using `#[tokio::main]`
159
161
///
160
- /// ```ignore
162
+ /// ```rust
163
+ /// # #[cfg(tokio_unstable)]
161
164
/// fn main() {
162
165
/// tokio::runtime::Builder::new_current_thread()
163
166
/// .enable_all()
You can’t perform that action at this time.
0 commit comments