Skip to content

Commit

Permalink
add #![allow(unknown_lints, unexpected_cfgs)] in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mox692 committed Jul 25, 2024
1 parent 580440b commit a432d1f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tokio-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ use proc_macro::TokenStream;
///
/// This option is only compatible with the `current_thread` runtime.
///
/// ```no_run
/// ```
/// # #![allow(unknown_lints, unexpected_cfgs)]
/// #[cfg(tokio_unstable)]
/// #[tokio::main(flavor = "current_thread", unhandled_panic = "shutdown_runtime")]
/// async fn main() {
Expand All @@ -224,7 +225,8 @@ use proc_macro::TokenStream;
///
/// Equivalent code not using `#[tokio::main]`
///
/// ```no_run
/// ```
/// # #![allow(unknown_lints, unexpected_cfgs)]
/// #[cfg(tokio_unstable)]
/// fn main() {
/// tokio::runtime::Builder::new_current_thread()
Expand Down Expand Up @@ -477,7 +479,8 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// This option is only compatible with the `current_thread` runtime.
///
/// ```no_run
/// ```
/// # #![allow(unknown_lints, unexpected_cfgs)]
/// #[cfg(tokio_unstable)]
/// #[tokio::test(flavor = "current_thread", unhandled_panic = "shutdown_runtime")]
/// async fn my_test() {
Expand All @@ -491,7 +494,8 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// Equivalent code not using `#[tokio::test]`
///
/// ```no_run
/// ```
/// # #![allow(unknown_lints, unexpected_cfgs)]
/// #[cfg(tokio_unstable)]
/// #[test]
/// fn my_test() {
Expand Down

0 comments on commit a432d1f

Please sign in to comment.