Snap for 8310722 from a2e0086b1a3443173b9d9951ca9b11a3a6ca3d83 to tm-release

Change-Id: I01774bfec41795276c484cb8dddf7b94d94553d6
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index ffd4f55..942329b 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
 {
   "git": {
-    "sha1": "7caefa51304e78fd5018cd5d2a03f3b9089cc010"
-  }
-}
+    "sha1": "fc1e3250219170e31cddb8857a276cba7dd08d44"
+  },
+  "path_in_vcs": "futures-macro"
+}
\ No newline at end of file
diff --git a/Android.bp b/Android.bp
index bfada3d..7674084 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,14 +41,12 @@
     name: "libfutures_macro",
     crate_name: "futures_macro",
     cargo_env_compat: true,
-    cargo_pkg_version: "0.3.17",
+    cargo_pkg_version: "0.3.21",
     srcs: ["src/lib.rs"],
     edition: "2018",
-    cfgs: ["fn_like_proc_macro"],
     rustlibs: [
         "libproc_macro2",
         "libquote",
         "libsyn",
     ],
-    proc_macros: ["libproc_macro_hack"],
 }
diff --git a/Cargo.toml b/Cargo.toml
index 8043d65..86fc5c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,19 +11,18 @@
 
 [package]
 edition = "2018"
+rust-version = "1.45"
 name = "futures-macro"
-version = "0.3.17"
-authors = ["Taylor Cramer <cramertj@google.com>", "Taiki Endo <te316e89@gmail.com>"]
-description = "The futures-rs procedural macro implementations.\n"
+version = "0.3.21"
+description = """
+The futures-rs procedural macro implementations.
+"""
 homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-macro/0.3"
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rust-lang/futures-rs"
 
 [lib]
 proc-macro = true
-[dependencies.proc-macro-hack]
-version = "0.5.19"
 
 [dependencies.proc-macro2]
 version = "1.0"
@@ -34,7 +33,5 @@
 [dependencies.syn]
 version = "1.0.56"
 features = ["full"]
-[build-dependencies.autocfg]
-version = "1"
 
 [features]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 3b2740c..a929d0f 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,12 +1,11 @@
 [package]
 name = "futures-macro"
+version = "0.3.21"
 edition = "2018"
-version = "0.3.17"
-authors = ["Taylor Cramer <cramertj@google.com>", "Taiki Endo <te316e89@gmail.com>"]
+rust-version = "1.45"
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rust-lang/futures-rs"
 homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-macro/0.3"
 description = """
 The futures-rs procedural macro implementations.
 """
@@ -16,11 +15,7 @@
 
 [features]
 
-[build-dependencies]
-autocfg = "1"
-
 [dependencies]
 proc-macro2 = "1.0"
-proc-macro-hack = "0.5.19"
 quote = "1.0"
 syn = { version = "1.0.56", features = ["full"] }
diff --git a/METADATA b/METADATA
index 2337a3f..ca144da 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/futures-macro/futures-macro-0.3.17.crate"
+    value: "https://static.crates.io/crates/futures-macro/futures-macro-0.3.21.crate"
   }
-  version: "0.3.17"
+  version: "0.3.21"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2021
-    month: 9
-    day: 22
+    year: 2022
+    month: 3
+    day: 1
   }
 }
diff --git a/build.rs b/build.rs
deleted file mode 100644
index ff8630c..0000000
--- a/build.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-#![warn(rust_2018_idioms, single_use_lifetimes)]
-
-use autocfg::AutoCfg;
-
-// The rustc-cfg strings below are *not* public API. Please let us know by
-// opening a GitHub issue if your build environment requires some way to enable
-// these cfgs other than by executing our build script.
-fn main() {
-    let cfg = match AutoCfg::new() {
-        Ok(cfg) => cfg,
-        Err(e) => {
-            println!(
-                "cargo:warning={}: unable to determine rustc version: {}",
-                env!("CARGO_PKG_NAME"),
-                e
-            );
-            return;
-        }
-    };
-
-    // Function like procedural macros in expressions patterns statements stabilized in Rust 1.45:
-    // https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#stabilizing-function-like-procedural-macros-in-expressions-patterns-and-statements
-    if cfg.probe_rustc_version(1, 45) {
-        println!("cargo:rustc-cfg=fn_like_proc_macro");
-    }
-
-    println!("cargo:rerun-if-changed=build.rs");
-}
diff --git a/src/lib.rs b/src/lib.rs
index fa93e48..0afe34b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -22,34 +22,30 @@
 mod stream_select;
 
 /// The `join!` macro.
-#[cfg_attr(fn_like_proc_macro, proc_macro)]
-#[cfg_attr(not(fn_like_proc_macro), proc_macro_hack::proc_macro_hack)]
+#[proc_macro]
 pub fn join_internal(input: TokenStream) -> TokenStream {
     crate::join::join(input)
 }
 
 /// The `try_join!` macro.
-#[cfg_attr(fn_like_proc_macro, proc_macro)]
-#[cfg_attr(not(fn_like_proc_macro), proc_macro_hack::proc_macro_hack)]
+#[proc_macro]
 pub fn try_join_internal(input: TokenStream) -> TokenStream {
     crate::join::try_join(input)
 }
 
 /// The `select!` macro.
-#[cfg_attr(fn_like_proc_macro, proc_macro)]
-#[cfg_attr(not(fn_like_proc_macro), proc_macro_hack::proc_macro_hack)]
+#[proc_macro]
 pub fn select_internal(input: TokenStream) -> TokenStream {
     crate::select::select(input)
 }
 
 /// The `select_biased!` macro.
-#[cfg_attr(fn_like_proc_macro, proc_macro)]
-#[cfg_attr(not(fn_like_proc_macro), proc_macro_hack::proc_macro_hack)]
+#[proc_macro]
 pub fn select_biased_internal(input: TokenStream) -> TokenStream {
     crate::select::select_biased(input)
 }
 
-// TODO: Change this to doc comment once rustdoc bug fixed.
+// TODO: Change this to doc comment once rustdoc bug fixed: https://github.com/rust-lang/futures-rs/pull/2435
 // The `test` attribute.
 #[proc_macro_attribute]
 pub fn test_internal(input: TokenStream, item: TokenStream) -> TokenStream {
@@ -57,8 +53,7 @@
 }
 
 /// The `stream_select!` macro.
-#[cfg_attr(fn_like_proc_macro, proc_macro)]
-#[cfg_attr(not(fn_like_proc_macro), proc_macro_hack::proc_macro_hack)]
+#[proc_macro]
 pub fn stream_select_internal(input: TokenStream) -> TokenStream {
     crate::stream_select::stream_select(input.into())
         .unwrap_or_else(syn::Error::into_compile_error)