diff options
-rw-r--r-- | .cargo_vcs_info.json | 7 | ||||
-rw-r--r-- | Android.bp | 2 | ||||
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 6 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | src/entry.rs | 10 | ||||
-rw-r--r-- | src/lib.rs | 1 |
8 files changed, 25 insertions, 21 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 @@ -22,7 +22,7 @@ rust_proc_macro { name: "libtokio_macros", crate_name: "tokio_macros", cargo_env_compat: true, - cargo_pkg_version: "1.6.0", + cargo_pkg_version: "1.7.0", srcs: ["src/lib.rs"], edition: "2018", rustlibs: [ 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]) @@ -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. """ @@ -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/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=> @@ -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)) |