aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:04:40 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:04:40 +0000
commit43e1609312f6b87310f08075c9a14764245b8d60 (patch)
tree5ca3112abfeb088af2eb1fa3278aa293f5bb71d7
parent7211e1d84d8d5d723cd93e496e30be260f052769 (diff)
parent5b564901faf2923d0f10735d4ee024687b611602 (diff)
downloadtokio-macros-android13-mainline-extservices-release.tar.gz
Snap for 8564071 from 5b564901faf2923d0f10735d4ee024687b611602 to mainline-extservices-releaseaml_ext_331814220aml_ext_331412000aml_ext_331312000aml_ext_331112010aml_ext_331012020android13-mainline-extservices-release
Change-Id: Ib8fc24e9f9fff8eb079f0900ba7c2739a5193ee2
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp22
-rw-r--r--CHANGELOG.md6
-rw-r--r--Cargo.toml4
-rw-r--r--Cargo.toml.orig6
-rw-r--r--METADATA10
-rw-r--r--TEST_MAPPING216
-rw-r--r--cargo2android.json4
-rw-r--r--src/entry.rs10
-rw-r--r--src/lib.rs1
10 files changed, 45 insertions, 241 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 92e2ebe..13f94be 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "623c09c52c2c38a8d75e94c166593547e8477707"
- }
-}
+ "sha1": "f64673580dfc649954eb744eb2734f2f118baa47"
+ },
+ "path_in_vcs": "tokio-macros"
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 1cdd044..47abc03 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --dependencies --tests.
+// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
@@ -21,6 +21,8 @@ license {
rust_proc_macro {
name: "libtokio_macros",
crate_name: "tokio_macros",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.7.0",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
@@ -29,21 +31,3 @@ rust_proc_macro {
"libsyn",
],
}
-
-rust_test_host {
- name: "tokio-macros_host_test_src_lib",
- crate_name: "tokio_macros",
- srcs: ["src/lib.rs"],
- test_suites: ["general-tests"],
- auto_gen_config: true,
- test_options: {
- unit_test: true,
- },
- edition: "2018",
- rustlibs: [
- "libproc_macro2",
- "libquote",
- "libsyn",
- "libtokio",
- ],
-}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb5504c..633b43f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+# 1.7.0 (December 15th, 2021)
+
+- macros: address remainging clippy::semicolon_if_nothing_returned warning ([#4252])
+
+[#4252]: https://github.com/tokio-rs/tokio/pull/4252
+
# 1.6.0 (November 16th, 2021)
- macros: fix mut patterns in `select!` macro ([#4211])
diff --git a/Cargo.toml b/Cargo.toml
index 818e827..a2342b9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,12 +11,12 @@
[package]
edition = "2018"
+rust-version = "1.46"
name = "tokio-macros"
-version = "1.6.0"
+version = "1.7.0"
authors = ["Tokio Contributors <team@tokio.rs>"]
description = "Tokio's proc macros.\n"
homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-macros/1.6.0/tokio_macros"
categories = ["asynchronous"]
license = "MIT"
repository = "https://github.com/tokio-rs/tokio"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 2114cd2..d9b0579 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -2,17 +2,15 @@
name = "tokio-macros"
# When releasing to crates.io:
# - Remove path dependencies
-# - Update doc url
-# - Cargo.toml
# - Update CHANGELOG.md.
# - Create "tokio-macros-1.0.x" git tag.
-version = "1.6.0"
+version = "1.7.0"
edition = "2018"
+rust-version = "1.46"
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/1.6.0/tokio_macros"
description = """
Tokio's proc macros.
"""
diff --git a/METADATA b/METADATA
index cd7a398..c40d9bc 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/tokio-macros/tokio-macros-1.6.0.crate"
+ value: "https://static.crates.io/crates/tokio-macros/tokio-macros-1.7.0.crate"
}
- version: "1.6.0"
+ version: "1.7.0"
license_type: NOTICE
last_upgrade_date {
- year: 2021
- month: 11
- day: 16
+ year: 2022
+ month: 3
+ day: 1
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 6c266ef..de9aee1 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,218 +1,30 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
{
- "presubmit": [
- {
- "name": "doh_unit_test"
- },
- {
- "name": "futures-util_device_test_src_lib"
- },
- {
- "name": "tokio-test_device_test_src_lib"
- },
- {
- "name": "tokio-test_device_test_tests_block_on"
- },
- {
- "name": "tokio-test_device_test_tests_io"
- },
- {
- "name": "tokio-test_device_test_tests_macros"
- },
- {
- "name": "tokio_device_test_tests__require_full"
- },
- {
- "name": "tokio_device_test_tests_buffered"
- },
+ "imports": [
{
- "name": "tokio_device_test_tests_io_async_fd"
+ "path": "external/rust/crates/futures-util"
},
{
- "name": "tokio_device_test_tests_io_async_read"
+ "path": "external/rust/crates/tokio"
},
{
- "name": "tokio_device_test_tests_io_chain"
- },
- {
- "name": "tokio_device_test_tests_io_copy"
- },
- {
- "name": "tokio_device_test_tests_io_copy_bidirectional"
- },
- {
- "name": "tokio_device_test_tests_io_driver"
- },
- {
- "name": "tokio_device_test_tests_io_driver_drop"
- },
- {
- "name": "tokio_device_test_tests_io_lines"
- },
- {
- "name": "tokio_device_test_tests_io_mem_stream"
- },
- {
- "name": "tokio_device_test_tests_io_read"
- },
- {
- "name": "tokio_device_test_tests_io_read_buf"
- },
- {
- "name": "tokio_device_test_tests_io_read_exact"
- },
- {
- "name": "tokio_device_test_tests_io_read_line"
- },
- {
- "name": "tokio_device_test_tests_io_read_to_end"
- },
- {
- "name": "tokio_device_test_tests_io_read_to_string"
- },
- {
- "name": "tokio_device_test_tests_io_read_until"
- },
- {
- "name": "tokio_device_test_tests_io_split"
- },
- {
- "name": "tokio_device_test_tests_io_take"
- },
- {
- "name": "tokio_device_test_tests_io_write"
- },
- {
- "name": "tokio_device_test_tests_io_write_all"
- },
- {
- "name": "tokio_device_test_tests_io_write_buf"
- },
- {
- "name": "tokio_device_test_tests_io_write_int"
- },
- {
- "name": "tokio_device_test_tests_macros_join"
- },
- {
- "name": "tokio_device_test_tests_macros_pin"
- },
- {
- "name": "tokio_device_test_tests_macros_select"
- },
- {
- "name": "tokio_device_test_tests_macros_test"
- },
- {
- "name": "tokio_device_test_tests_macros_try_join"
- },
- {
- "name": "tokio_device_test_tests_net_bind_resource"
- },
- {
- "name": "tokio_device_test_tests_net_lookup_host"
- },
- {
- "name": "tokio_device_test_tests_no_rt"
- },
- {
- "name": "tokio_device_test_tests_process_kill_on_drop"
- },
- {
- "name": "tokio_device_test_tests_rt_basic"
- },
- {
- "name": "tokio_device_test_tests_rt_common"
- },
- {
- "name": "tokio_device_test_tests_rt_threaded"
- },
- {
- "name": "tokio_device_test_tests_sync_barrier"
- },
- {
- "name": "tokio_device_test_tests_sync_broadcast"
- },
- {
- "name": "tokio_device_test_tests_sync_errors"
- },
- {
- "name": "tokio_device_test_tests_sync_mpsc"
- },
- {
- "name": "tokio_device_test_tests_sync_mutex"
- },
- {
- "name": "tokio_device_test_tests_sync_mutex_owned"
- },
- {
- "name": "tokio_device_test_tests_sync_notify"
- },
- {
- "name": "tokio_device_test_tests_sync_oneshot"
- },
- {
- "name": "tokio_device_test_tests_sync_rwlock"
- },
- {
- "name": "tokio_device_test_tests_sync_semaphore"
- },
- {
- "name": "tokio_device_test_tests_sync_semaphore_owned"
- },
- {
- "name": "tokio_device_test_tests_sync_watch"
- },
- {
- "name": "tokio_device_test_tests_task_abort"
- },
- {
- "name": "tokio_device_test_tests_task_blocking"
- },
- {
- "name": "tokio_device_test_tests_task_local"
- },
- {
- "name": "tokio_device_test_tests_task_local_set"
- },
- {
- "name": "tokio_device_test_tests_tcp_accept"
- },
- {
- "name": "tokio_device_test_tests_tcp_connect"
- },
- {
- "name": "tokio_device_test_tests_tcp_echo"
- },
- {
- "name": "tokio_device_test_tests_tcp_into_split"
- },
- {
- "name": "tokio_device_test_tests_tcp_into_std"
- },
- {
- "name": "tokio_device_test_tests_tcp_peek"
- },
- {
- "name": "tokio_device_test_tests_tcp_shutdown"
- },
- {
- "name": "tokio_device_test_tests_tcp_socket"
- },
- {
- "name": "tokio_device_test_tests_tcp_split"
- },
+ "path": "external/rust/crates/tokio-test"
+ }
+ ],
+ "presubmit": [
{
- "name": "tokio_device_test_tests_time_rt"
+ "name": "doh_unit_test"
},
{
- "name": "tokio_device_test_tests_udp"
- },
+ "name": "rustBinderTest"
+ }
+ ],
+ "presubmit-rust": [
{
- "name": "tokio_device_test_tests_uds_cred"
+ "name": "doh_unit_test"
},
{
- "name": "tokio_device_test_tests_uds_split"
+ "name": "rustBinderTest"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..341300b
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,4 @@
+{
+ "run": true,
+ "tests": true
+} \ No newline at end of file
diff --git a/src/entry.rs b/src/entry.rs
index 01f8ee4..5cb4a49 100644
--- a/src/entry.rs
+++ b/src/entry.rs
@@ -339,17 +339,17 @@ fn parse_knobs(mut input: syn::ItemFn, is_test: bool, config: FinalConfig) -> To
let body = &input.block;
let brace_token = input.block.brace_token;
let (tail_return, tail_semicolon) = match body.stmts.last() {
- Some(syn::Stmt::Semi(expr, _)) => match expr {
- syn::Expr::Return(_) => (quote! { return }, quote! { ; }),
- _ => match &input.sig.output {
+ Some(syn::Stmt::Semi(syn::Expr::Return(_), _)) => (quote! { return }, quote! { ; }),
+ Some(syn::Stmt::Semi(..)) | Some(syn::Stmt::Local(..)) | None => {
+ match &input.sig.output {
syn::ReturnType::Type(_, ty) if matches!(&**ty, syn::Type::Tuple(ty) if ty.elems.is_empty()) =>
{
(quote! {}, quote! { ; }) // unit
}
syn::ReturnType::Default => (quote! {}, quote! { ; }), // unit
syn::ReturnType::Type(..) => (quote! {}, quote! {}), // ! or another
- },
- },
+ }
+ }
_ => (quote! {}, quote! {}),
};
input.block = syn::parse2(quote_spanned! {last_stmt_end_span=>
diff --git a/src/lib.rs b/src/lib.rs
index f8ba8ea..38638a1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,7 +5,6 @@
rust_2018_idioms,
unreachable_pub
)]
-#![cfg_attr(docsrs, deny(rustdoc::broken_intra_doc_links))]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))