aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2023-11-01 10:29:24 +0000
committerAlice Ryhl <aliceryhl@google.com>2023-11-01 12:09:37 +0000
commit98c70049ece2a1ef8feb2cee1523e12bf980fbf9 (patch)
treea55449e24e272fabf9ced9b4ca2ad3a4d70c49d9 /src/lib.rs
parente80b3d6e5fffc67d4e978f24b3e7e4135bff4d60 (diff)
downloadtokio-macros-98c70049ece2a1ef8feb2cee1523e12bf980fbf9.tar.gz
Update tokio-macros to v2.1.0
Test: ran Tokio's tests Change-Id: I8b3045bf350e3fa3f27fd176bfc11a92cdbed86f
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 11bbbae..1d024f5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -204,7 +204,7 @@ use proc_macro::TokenStream;
#[proc_macro_attribute]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
- entry::main(args, item, true)
+ entry::main(args.into(), item.into(), true).into()
}
/// Marks async function to be executed by selected runtime. This macro helps set up a `Runtime`
@@ -269,7 +269,7 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
#[proc_macro_attribute]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
- entry::main(args, item, false)
+ entry::main(args.into(), item.into(), false).into()
}
/// Marks async function to be executed by runtime, suitable to test environment.
@@ -295,8 +295,7 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
/// ```
///
/// The `worker_threads` option configures the number of worker threads, and
-/// defaults to the number of cpus on the system. This is the default
-/// flavor.
+/// defaults to the number of cpus on the system.
///
/// Note: The multi-threaded runtime requires the `rt-multi-thread` feature
/// flag.
@@ -427,7 +426,7 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
/// ```
#[proc_macro_attribute]
pub fn test(args: TokenStream, item: TokenStream) -> TokenStream {
- entry::test(args, item, true)
+ entry::test(args.into(), item.into(), true).into()
}
/// Marks async function to be executed by runtime, suitable to test environment
@@ -442,7 +441,7 @@ pub fn test(args: TokenStream, item: TokenStream) -> TokenStream {
/// ```
#[proc_macro_attribute]
pub fn test_rt(args: TokenStream, item: TokenStream) -> TokenStream {
- entry::test(args, item, false)
+ entry::test(args.into(), item.into(), false).into()
}
/// Always fails with the error message below.