Upgrade futures to 0.3.26 am: 4c9fd15119

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

Change-Id: Ieb8245f1178b566a8d64cf459dfcad645553ac96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index c68093a..c5e5d7e 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
 {
   "git": {
-    "sha1": "77d82198c5afd04af3e760a6aa50b7e875289fc3"
+    "sha1": "5e3693a350f96244151081d2c030208cd15f9572"
   },
   "path_in_vcs": "futures"
 }
\ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 0e41e22..2acdd2c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -42,7 +42,7 @@
     host_supported: true,
     crate_name: "futures",
     cargo_env_compat: true,
-    cargo_pkg_version: "0.3.25",
+    cargo_pkg_version: "0.3.26",
     srcs: ["src/lib.rs"],
     edition: "2018",
     features: [
diff --git a/Cargo.toml b/Cargo.toml
index 4a025a8..51e052a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 edition = "2018"
 rust-version = "1.45"
 name = "futures"
-version = "0.3.25"
+version = "0.3.26"
 description = """
 An implementation of futures and streams featuring zero allocations,
 composability, and iterator-like interfaces.
@@ -47,33 +47,33 @@
 ]
 
 [dependencies.futures-channel]
-version = "0.3.25"
+version = "0.3.26"
 features = ["sink"]
 default-features = false
 
 [dependencies.futures-core]
-version = "0.3.25"
+version = "0.3.26"
 default-features = false
 
 [dependencies.futures-executor]
-version = "0.3.25"
+version = "0.3.26"
 optional = true
 default-features = false
 
 [dependencies.futures-io]
-version = "0.3.25"
+version = "0.3.26"
 default-features = false
 
 [dependencies.futures-sink]
-version = "0.3.25"
+version = "0.3.26"
 default-features = false
 
 [dependencies.futures-task]
-version = "0.3.25"
+version = "0.3.26"
 default-features = false
 
 [dependencies.futures-util]
-version = "0.3.25"
+version = "0.3.26"
 features = ["sink"]
 default-features = false
 
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 544a1e3..e7a5f38 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "futures"
-version = "0.3.25"
+version = "0.3.26"
 edition = "2018"
 rust-version = "1.45"
 license = "MIT OR Apache-2.0"
@@ -15,13 +15,13 @@
 categories = ["asynchronous"]
 
 [dependencies]
-futures-core = { path = "../futures-core", version = "0.3.25", default-features = false }
-futures-task = { path = "../futures-task", version = "0.3.25", default-features = false }
-futures-channel = { path = "../futures-channel", version = "0.3.25", default-features = false, features = ["sink"] }
-futures-executor = { path = "../futures-executor", version = "0.3.25", default-features = false, optional = true }
-futures-io = { path = "../futures-io", version = "0.3.25", default-features = false }
-futures-sink = { path = "../futures-sink", version = "0.3.25", default-features = false }
-futures-util = { path = "../futures-util", version = "0.3.25", default-features = false, features = ["sink"] }
+futures-core = { path = "../futures-core", version = "0.3.26", default-features = false }
+futures-task = { path = "../futures-task", version = "0.3.26", default-features = false }
+futures-channel = { path = "../futures-channel", version = "0.3.26", default-features = false, features = ["sink"] }
+futures-executor = { path = "../futures-executor", version = "0.3.26", default-features = false, optional = true }
+futures-io = { path = "../futures-io", version = "0.3.26", default-features = false }
+futures-sink = { path = "../futures-sink", version = "0.3.26", default-features = false }
+futures-util = { path = "../futures-util", version = "0.3.26", default-features = false, features = ["sink"] }
 
 [dev-dependencies]
 futures-executor = { path = "../futures-executor", features = ["thread-pool"] }
diff --git a/METADATA b/METADATA
index 1dee576..240fa20 100644
--- a/METADATA
+++ b/METADATA
@@ -11,13 +11,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/futures/futures-0.3.25.crate"
+    value: "https://static.crates.io/crates/futures/futures-0.3.26.crate"
   }
-  version: "0.3.25"
+  version: "0.3.26"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2022
-    month: 12
-    day: 12
+    year: 2023
+    month: 2
+    day: 15
   }
 }
diff --git a/README.md b/README.md
index e6127fd..45e1f5b 100644
--- a/README.md
+++ b/README.md
@@ -8,16 +8,16 @@
 
 <p align="center">
   <a href="https://github.com/rust-lang/futures-rs/actions?query=branch%3Amaster">
-    <img alt="Build Status" src="https://img.shields.io/github/workflow/status/rust-lang/futures-rs/CI/master">
+    <img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/rust-lang/futures-rs/ci.yml?branch=master">
   </a>
 
   <a href="https://crates.io/crates/futures">
-    <img alt="Crates.io" src="https://img.shields.io/crates/v/futures.svg">
+    <img alt="crates.io" src="https://img.shields.io/crates/v/futures.svg">
   </a>
 </p>
 
 <p align="center">
-  <a href="https://docs.rs/futures/">
+  <a href="https://docs.rs/futures">
     Documentation
   </a> | <a href="https://rust-lang.github.io/futures-rs/">
     Website
diff --git a/tests/async_await_macros.rs b/tests/async_await_macros.rs
index 250e345..82a617f 100644
--- a/tests/async_await_macros.rs
+++ b/tests/async_await_macros.rs
@@ -380,11 +380,13 @@
     assert_eq!(mem::size_of_val(&fut), 48);
 }
 
+#[allow(clippy::let_underscore_future)]
 #[test]
 fn join_doesnt_require_unpin() {
     let _ = async { join!(async {}, async {}) };
 }
 
+#[allow(clippy::let_underscore_future)]
 #[test]
 fn try_join_doesnt_require_unpin() {
     let _ = async { try_join!(async { Ok::<(), ()>(()) }, async { Ok::<(), ()>(()) },) };
diff --git a/tests/auto_traits.rs b/tests/auto_traits.rs
index da00ccf..5fc0f7d 100644
--- a/tests/auto_traits.rs
+++ b/tests/auto_traits.rs
@@ -1480,10 +1480,10 @@
     assert_not_impl!(PollImmediate<PinnedStream>: Unpin);
 
     assert_impl!(ReadyChunks<SendStream<()>>: Send);
-    assert_not_impl!(ReadyChunks<SendStream>: Send);
+    assert_impl!(ReadyChunks<SendStream>: Send);
     assert_not_impl!(ReadyChunks<LocalStream>: Send);
     assert_impl!(ReadyChunks<SyncStream<()>>: Sync);
-    assert_not_impl!(ReadyChunks<SyncStream>: Sync);
+    assert_impl!(ReadyChunks<SyncStream>: Sync);
     assert_not_impl!(ReadyChunks<LocalStream>: Sync);
     assert_impl!(ReadyChunks<UnpinStream>: Unpin);
     assert_not_impl!(ReadyChunks<PinnedStream>: Unpin);
diff --git a/tests/eventual.rs b/tests/eventual.rs
index 951c55c..57a49b2 100644
--- a/tests/eventual.rs
+++ b/tests/eventual.rs
@@ -16,6 +16,8 @@
     run(future::try_join(ok::<i32, i32>(1), ok(2)).map_ok(move |v| tx.send(v).unwrap()));
     assert_eq!(rx.recv(), Ok((1, 2)));
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -30,6 +32,8 @@
     c2.send(2).unwrap();
     assert_eq!(rx.recv(), Ok((1, 2)));
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -43,6 +47,8 @@
     assert_eq!(rx.recv(), Ok(1));
     assert!(rx.recv().is_err());
     drop(c2);
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -56,6 +62,8 @@
     assert!(rx.recv().is_ok());
     drop(c2);
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -73,6 +81,8 @@
     c3.send(3).unwrap();
     assert_eq!(rx.recv(), Ok(((1, 2), 3)));
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -92,6 +102,8 @@
     c2.send(2).unwrap();
     assert_eq!(rx.recv(), Ok(2));
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -111,6 +123,8 @@
     c2.send(2).unwrap();
     assert_eq!(rx.recv(), Ok(2));
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -130,6 +144,8 @@
     drop(c2);
     assert_eq!(rx.recv(), Ok(2));
     assert!(rx.recv().is_err());
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
 
 #[test]
@@ -158,4 +174,6 @@
     drop(tx);
 
     t.join().unwrap();
+
+    std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
 }
diff --git a/tests/future_shared.rs b/tests/future_shared.rs
index 6bf43d2..bd69c1d 100644
--- a/tests/future_shared.rs
+++ b/tests/future_shared.rs
@@ -152,6 +152,52 @@
 }
 
 #[test]
+fn ptr_eq() {
+    use future::FusedFuture;
+    use std::collections::hash_map::DefaultHasher;
+    use std::hash::Hasher;
+
+    let (tx, rx) = oneshot::channel::<i32>();
+    let shared = rx.shared();
+    let mut shared2 = shared.clone();
+    let mut hasher = DefaultHasher::new();
+    let mut hasher2 = DefaultHasher::new();
+
+    // Because these two futures share the same underlying future,
+    // `ptr_eq` should return true.
+    assert!(shared.ptr_eq(&shared2));
+    // Equivalence relations are symmetric
+    assert!(shared2.ptr_eq(&shared));
+
+    // If `ptr_eq` returns true, they should hash to the same value.
+    shared.ptr_hash(&mut hasher);
+    shared2.ptr_hash(&mut hasher2);
+    assert_eq!(hasher.finish(), hasher2.finish());
+
+    tx.send(42).unwrap();
+    assert_eq!(block_on(&mut shared2).unwrap(), 42);
+
+    // Now that `shared2` has completed, `ptr_eq` should return false.
+    assert!(shared2.is_terminated());
+    assert!(!shared.ptr_eq(&shared2));
+
+    // `ptr_eq` should continue to work for the other `Shared`.
+    let shared3 = shared.clone();
+    let mut hasher3 = DefaultHasher::new();
+    assert!(shared.ptr_eq(&shared3));
+
+    shared3.ptr_hash(&mut hasher3);
+    assert_eq!(hasher.finish(), hasher3.finish());
+
+    let (_tx, rx) = oneshot::channel::<i32>();
+    let shared4 = rx.shared();
+
+    // And `ptr_eq` should return false for two futures that don't share
+    // the underlying future.
+    assert!(!shared.ptr_eq(&shared4));
+}
+
+#[test]
 fn dont_clone_in_single_owner_shared_future() {
     let counter = CountClone(Rc::new(Cell::new(0)));
     let (tx, rx) = oneshot::channel();
diff --git a/tests/stream_futures_ordered.rs b/tests/stream_futures_ordered.rs
index 8b85a33..5a4a3e2 100644
--- a/tests/stream_futures_ordered.rs
+++ b/tests/stream_futures_ordered.rs
@@ -146,3 +146,27 @@
     assert!(stream.poll_next_unpin(cx).is_pending());
     assert!(stream.poll_next_unpin(cx).is_pending());
 }
+
+#[test]
+fn test_push_front_negative() {
+    let (a_tx, a_rx) = oneshot::channel::<i32>();
+    let (b_tx, b_rx) = oneshot::channel::<i32>();
+    let (c_tx, c_rx) = oneshot::channel::<i32>();
+
+    let mut stream = FuturesOrdered::new();
+
+    let mut cx = noop_context();
+
+    stream.push_front(a_rx);
+    stream.push_front(b_rx);
+    stream.push_front(c_rx);
+
+    a_tx.send(1).unwrap();
+    b_tx.send(2).unwrap();
+    c_tx.send(3).unwrap();
+
+    // These should all be recieved in reverse order
+    assert_eq!(Poll::Ready(Some(Ok(3))), stream.poll_next_unpin(&mut cx));
+    assert_eq!(Poll::Ready(Some(Ok(2))), stream.poll_next_unpin(&mut cx));
+    assert_eq!(Poll::Ready(Some(Ok(1))), stream.poll_next_unpin(&mut cx));
+}