Upgrade rust/crates/futures-channel to 0.3.16 am: e8695389e1 am: 67b97058ad am: 77e4c2ab1c

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/futures-channel/+/1791030

Change-Id: Ic23b43caf730840654aa7899561d826f86d8a183
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index ec6442e..99dc8b0 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "fc080d153bc7bf00429ec5e2b91e2f21f2243846"
+    "sha1": "ab38fd29d3f84f8fc028fa7883e53dba423da0ee"
   }
 }
diff --git a/Android.bp b/Android.bp
index 482071d..4abd933 100644
--- a/Android.bp
+++ b/Android.bp
@@ -64,4 +64,4 @@
 }
 
 // dependent_library ["feature_list"]
-//   futures-core-0.3.15 "alloc,std"
+//   futures-core-0.3.16 "alloc,std"
diff --git a/Cargo.toml b/Cargo.toml
index ea9abd5..e25905c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,17 +3,16 @@
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
 #
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
 
 [package]
 edition = "2018"
 name = "futures-channel"
-version = "0.3.15"
+version = "0.3.16"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
 description = "Channels for asynchronous communication using futures-rs.\n"
 homepage = "https://rust-lang.github.io/futures-rs"
@@ -24,11 +23,11 @@
 all-features = true
 rustdoc-args = ["--cfg", "docsrs"]
 [dependencies.futures-core]
-version = "0.3.15"
+version = "0.3.16"
 default-features = false
 
 [dependencies.futures-sink]
-version = "0.3.15"
+version = "0.3.16"
 optional = true
 default-features = false
 
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index fae78a0..1d3cb74 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
 [package]
 name = "futures-channel"
 edition = "2018"
-version = "0.3.15"
+version = "0.3.16"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rust-lang/futures-rs"
@@ -23,8 +23,8 @@
 cfg-target-has-atomic = []
 
 [dependencies]
-futures-core = { path = "../futures-core", version = "0.3.15", default-features = false }
-futures-sink = { path = "../futures-sink", version = "0.3.15", default-features = false, optional = true }
+futures-core = { path = "../futures-core", version = "0.3.16", default-features = false }
+futures-sink = { path = "../futures-sink", version = "0.3.16", default-features = false, optional = true }
 
 [dev-dependencies]
 futures = { path = "../futures", default-features = true }
diff --git a/METADATA b/METADATA
index 6974fd2..a253153 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/futures-channel/futures-channel-0.3.15.crate"
+    value: "https://static.crates.io/crates/futures-channel/futures-channel-0.3.16.crate"
   }
-  version: "0.3.15"
+  version: "0.3.16"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 5
-    day: 19
+    month: 8
+    day: 9
   }
 }
diff --git a/build.rs b/build.rs
index c4f341d..07b50bd 100644
--- a/build.rs
+++ b/build.rs
@@ -8,7 +8,7 @@
 // and outside of the normal semver guarantees:
 //
 // - `futures_no_atomic_cas`
-//      Assume the target does not have atomic CAS (compare-and-swap).
+//      Assume the target does *not* support atomic CAS operations.
 //      This is usually detected automatically by the build script, but you may
 //      need to enable it manually when building for custom targets or using
 //      non-cargo build systems that don't run the build script.
diff --git a/no_atomic_cas.rs b/no_atomic_cas.rs
index 0819af1..4708bf8 100644
--- a/no_atomic_cas.rs
+++ b/no_atomic_cas.rs
@@ -3,6 +3,8 @@
 
 const NO_ATOMIC_CAS_TARGETS: &[&str] = &[
     "avr-unknown-gnu-atmega328",
+    "bpfeb-unknown-none",
+    "bpfel-unknown-none",
     "msp430-none-elf",
     "riscv32i-unknown-none-elf",
     "riscv32imc-unknown-none-elf",
diff --git a/src/lib.rs b/src/lib.rs
index 9377a3e..4cd936d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -12,27 +12,31 @@
 //! library is activated, and it is activated by default.
 
 #![cfg_attr(not(feature = "std"), no_std)]
-#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms, unreachable_pub)]
-// It cannot be included in the published code because this lints have false positives in the minimum required version.
-#![cfg_attr(test, warn(single_use_lifetimes))]
-#![warn(clippy::all)]
-#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
+#![warn(
+    missing_debug_implementations,
+    missing_docs,
+    rust_2018_idioms,
+    single_use_lifetimes,
+    unreachable_pub
+)]
+#![doc(test(
+    no_crate_inject,
+    attr(
+        deny(warnings, rust_2018_idioms, single_use_lifetimes),
+        allow(dead_code, unused_assignments, unused_variables)
+    )
+))]
 
-macro_rules! cfg_target_has_atomic {
-    ($($item:item)*) => {$(
-        #[cfg(not(futures_no_atomic_cas))]
-        $item
-    )*};
-}
+#[cfg(not(futures_no_atomic_cas))]
+#[cfg(feature = "alloc")]
+extern crate alloc;
 
-cfg_target_has_atomic! {
-    #[cfg(feature = "alloc")]
-    extern crate alloc;
-
-    #[cfg(feature = "alloc")]
-    mod lock;
-    #[cfg(feature = "std")]
-    pub mod mpsc;
-    #[cfg(feature = "alloc")]
-    pub mod oneshot;
-}
+#[cfg(not(futures_no_atomic_cas))]
+#[cfg(feature = "alloc")]
+mod lock;
+#[cfg(not(futures_no_atomic_cas))]
+#[cfg(feature = "std")]
+pub mod mpsc;
+#[cfg(not(futures_no_atomic_cas))]
+#[cfg(feature = "alloc")]
+pub mod oneshot;
diff --git a/src/mpsc/mod.rs b/src/mpsc/mod.rs
index 28612da..44834b7 100644
--- a/src/mpsc/mod.rs
+++ b/src/mpsc/mod.rs
@@ -510,9 +510,8 @@
 
     // Do the send without failing.
     // Can be called only by bounded sender.
-    #[allow(clippy::debug_assert_with_mut_call)]
     fn do_send_b(&mut self, msg: T) -> Result<(), TrySendError<T>> {
-        // Anyone callig do_send *should* make sure there is room first,
+        // Anyone calling do_send *should* make sure there is room first,
         // but assert here for tests as a sanity check.
         debug_assert!(self.poll_unparked(None).is_ready());