aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2021-01-26 20:26:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-01-26 20:26:45 +0000
commit762279d6c1a7def54ea9064f5c2d1f89a2d34549 (patch)
tree4976a7b7335fbd4966fb5b59e4915ddc04b99890
parent85a7135cfd753080f6356cce297f576c36704d73 (diff)
parent333a85fa58c59f1d7f93ee1dc572fe4f3cc23e5b (diff)
downloadtokio-macros-762279d6c1a7def54ea9064f5c2d1f89a2d34549.tar.gz
Upgrade rust/crates/tokio-macros to 1.0.0 am: b71afff3c8 am: 5a5ae3047b am: 333a85fa58
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tokio-macros/+/1535568 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I51cb056a4ae6e120b5479ec6773b25e84b754112
-rw-r--r--.cargo_vcs_info.json5
-rw-r--r--Android.bp23
-rw-r--r--CHANGELOG.md9
-rw-r--r--Cargo.toml9
-rw-r--r--Cargo.toml.orig8
-rw-r--r--LICENSE2
-rw-r--r--METADATA6
-rw-r--r--src/lib.rs52
8 files changed, 40 insertions, 74 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
deleted file mode 100644
index bb691dc..0000000
--- a/.cargo_vcs_info.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "git": {
- "sha1": "171724863db9c82929737d37bd93725e5a5f8af0"
- }
-}
diff --git a/Android.bp b/Android.bp
index bb0e701..53f4ef0 100644
--- a/Android.bp
+++ b/Android.bp
@@ -23,34 +23,11 @@ rust_test_host {
"libproc_macro2",
"libquote",
"libsyn",
- "libtokio",
],
}
// dependent_library ["feature_list"]
-// autocfg-1.0.1
-// bytes-0.6.0 "default,std"
-// cfg-if-0.1.10
-// cfg-if-1.0.0
-// futures-core-0.3.8 "alloc,default,std"
-// instant-0.1.9
-// libc-0.2.81 "align,default,std"
-// lock_api-0.4.2
-// log-0.4.11
-// memchr-2.3.4 "default,std"
-// mio-0.7.6 "default,net,os-ext,os-poll,os-util,tcp,udp,uds"
-// num_cpus-1.13.0
-// once_cell-1.5.2 "alloc,default,std"
-// parking_lot-0.11.1 "default"
-// parking_lot_core-0.8.2
-// pin-project-lite-0.2.0
// proc-macro2-1.0.24 "default,proc-macro"
// quote-1.0.8 "default,proc-macro"
-// scopeguard-1.1.0
-// signal-hook-registry-1.3.0
-// slab-0.4.2
-// smallvec-1.5.1
// syn-1.0.55 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote"
-// tokio-0.3.6 "bytes,default,fs,full,futures-core,io-std,io-util,libc,macros,memchr,mio,net,num_cpus,once_cell,parking_lot,process,rt,rt-multi-thread,signal,signal-hook-registry,slab,stream,sync,time,tokio-macros,winapi"
-// tokio-macros-0.3.2
// unicode-xid-0.2.1 "default"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 881da1e..26ee5ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,6 @@
-# 0.3.2 (December 19, 2020)
+# 1.0.0 (December 23, 2020)
-### Fixed
-
-- fix outdated macro documentation ([#3180])
-- add portability note to `tokio::main` ([#3199])
+- track `tokio` 1.0 release.
# 0.3.1 (October 25, 2020)
@@ -58,5 +55,3 @@
[#2177]: https://github.com/tokio-rs/tokio/pull/2177
[#2225]: https://github.com/tokio-rs/tokio/pull/2225
[#3038]: https://github.com/tokio-rs/tokio/pull/3038
-[#3180]: https://github.com/tokio-rs/tokio/pull/3180
-[#3199]: https://github.com/tokio-rs/tokio/pull/3199
diff --git a/Cargo.toml b/Cargo.toml
index 4dad0d6..b858399 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,11 +13,11 @@
[package]
edition = "2018"
name = "tokio-macros"
-version = "0.3.2"
+version = "1.0.0"
authors = ["Tokio Contributors <team@tokio.rs>"]
description = "Tokio's proc macros.\n"
homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-macros/0.3.2/tokio_macros"
+documentation = "https://docs.rs/tokio-macros/1.0.0/tokio_macros"
categories = ["asynchronous"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
@@ -35,8 +35,7 @@ version = "1"
[dependencies.syn]
version = "1.0.3"
features = ["full"]
-[dev-dependencies.tokio]
-version = "0.3.0"
-features = ["full"]
+
+[dev-dependencies]
[features]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 7f312e8..a1392a3 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -6,14 +6,14 @@ name = "tokio-macros"
# - Update doc url
# - Cargo.toml
# - Update CHANGELOG.md.
-# - Create "v0.3.x" git tag.
-version = "0.3.2"
+# - Create "tokio-macros-1.0.x" git tag.
+version = "1.0.0"
edition = "2018"
authors = ["Tokio Contributors <team@tokio.rs>"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-macros/0.3.2/tokio_macros"
+documentation = "https://docs.rs/tokio-macros/1.0.0/tokio_macros"
description = """
Tokio's proc macros.
"""
@@ -30,7 +30,7 @@ quote = "1"
syn = { version = "1.0.3", features = ["full"] }
[dev-dependencies]
-tokio = { version = "0.3.0", path = "../tokio", features = ["full"] }
+# tokio = { version = "1.0.0", path = "../tokio", features = ["full"] }
[package.metadata.docs.rs]
all-features = true
diff --git a/LICENSE b/LICENSE
index 0fbb739..6c6df9c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2019 Tokio Contributors
+Copyright (c) 2020 Tokio Contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
diff --git a/METADATA b/METADATA
index bd97fb7..213c44e 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/tokio-macros/tokio-macros-0.3.2.crate"
+ value: "https://static.crates.io/crates/tokio-macros/tokio-macros-1.0.0.crate"
}
- version: "0.3.2"
+ version: "1.0.0"
license_type: NOTICE
last_upgrade_date {
year: 2020
month: 12
- day: 22
+ day: 23
}
}
diff --git a/src/lib.rs b/src/lib.rs
index b07005f..b48bd00 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc(html_root_url = "https://docs.rs/tokio-macros/0.3.2")]
+#![doc(html_root_url = "https://docs.rs/tokio-macros/1.0.0")]
#![allow(clippy::needless_doctest_main)]
#![warn(
missing_debug_implementations,
@@ -24,8 +24,8 @@ mod select;
use proc_macro::TokenStream;
-/// Marks async function to be executed by the selected runtime. This macro helps
-/// set up a `Runtime` without requiring the user to use
+/// Marks async function to be executed by the selected runtime. This macro
+/// helps set up a `Runtime` without requiring the user to use
/// [Runtime](../tokio/runtime/struct.Runtime.html) or
/// [Builder](../tokio/runtime/struct.Builder.html) directly.
///
@@ -36,10 +36,10 @@ use proc_macro::TokenStream;
/// powerful interface.
///
/// Note: This macro can be used on any function and not just the `main`
-/// function. Using it on a non-main function makes the function behave
-/// as if it was synchronous by starting a new runtime each time it is called.
-/// If the function is called often, it is preferable to create the runtime using
-/// the runtime builder so the runtime can be reused across calls.
+/// function. Using it on a non-main function makes the function behave as if it
+/// was synchronous by starting a new runtime each time it is called. If the
+/// function is called often, it is preferable to create the runtime using the
+/// runtime builder so the runtime can be reused across calls.
///
/// # Multi-threaded runtime
///
@@ -53,6 +53,9 @@ use proc_macro::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.
///
+/// Note: The multi-threaded runtime requires the `rt-multi-thread` feature
+/// flag.
+///
/// # Current thread runtime
///
/// To use the single-threaded runtime known as the `current_thread` runtime,
@@ -143,10 +146,10 @@ use proc_macro::TokenStream;
///
/// ### NOTE:
///
-/// If you rename the tokio crate in your dependencies this macro will not work.
-/// If you must rename the 0.3 version of tokio because you're also using the
-/// 0.1 version of tokio, you _must_ make the tokio 0.3 crate available as
-/// `tokio` in the module where this macro is expanded.
+/// If you rename the Tokio crate in your dependencies this macro will not work.
+/// If you must rename the current version of Tokio because you're also using an
+/// older version of Tokio, you _must_ make the current version of Tokio
+/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
@@ -188,11 +191,10 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// ### NOTE:
///
-/// If you rename the tokio crate in your dependencies this macro
-/// will not work. If you must rename the 0.3 version of tokio because
-/// you're also using the 0.1 version of tokio, you _must_ make the
-/// tokio 0.3 crate available as `tokio` in the module where this
-/// macro is expanded.
+/// If you rename the Tokio crate in your dependencies this macro will not work.
+/// If you must rename the current version of Tokio because you're also using an
+/// older version of Tokio, you _must_ make the current version of Tokio
+/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
@@ -225,11 +227,10 @@ pub fn main_rt(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// ### NOTE:
///
-/// If you rename the tokio crate in your dependencies this macro
-/// will not work. If you must rename the 0.3 version of tokio because
-/// you're also using the 0.1 version of tokio, you _must_ make the
-/// tokio 0.3 crate available as `tokio` in the module where this
-/// macro is expanded.
+/// If you rename the Tokio crate in your dependencies this macro will not work.
+/// If you must rename the current version of Tokio because you're also using an
+/// older version of Tokio, you _must_ make the current version of Tokio
+/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
pub fn test(args: TokenStream, item: TokenStream) -> TokenStream {
entry::test(args, item, true)
@@ -248,11 +249,10 @@ pub fn test(args: TokenStream, item: TokenStream) -> TokenStream {
///
/// ### NOTE:
///
-/// If you rename the tokio crate in your dependencies this macro
-/// will not work. If you must rename the 0.3 version of tokio because
-/// you're also using the 0.1 version of tokio, you _must_ make the
-/// tokio 0.3 crate available as `tokio` in the module where this
-/// macro is expanded.
+/// If you rename the Tokio crate in your dependencies this macro will not work.
+/// If you must rename the current version of Tokio because you're also using an
+/// older version of Tokio, you _must_ make the current version of Tokio
+/// available as `tokio` in the module where this macro is expanded.
#[proc_macro_attribute]
pub fn test_rt(args: TokenStream, item: TokenStream) -> TokenStream {
entry::test(args, item, false)