Snap for 7188367 from 56d0192fae0c0273059acafb21a76914bd8f16cc to sc-d1-release
Change-Id: Ia6889f13b989d949f6a156e047b0cc43946bbad4
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
new file mode 100644
index 0000000..f3ad3ab
--- /dev/null
+++ b/.cargo_vcs_info.json
@@ -0,0 +1,5 @@
+{
+ "git": {
+ "sha1": "c91f8691672c7401b1923ab00bf138975c99391a"
+ }
+}
diff --git a/Android.bp b/Android.bp
index d65c91f..80c7d2c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
// This file is generated by cargo2android.py --run --dependencies --device --tests --patch=patches/Android.bp.patch.
+// Do not modify this file as changes will be overridden on upgrade.
package {
default_applicable_licenses: ["external_rust_crates_futures-core_license"],
@@ -53,6 +54,9 @@
rust_test_host {
name: "futures-core_host_test_src_lib",
defaults: ["futures-core_defaults"],
+ test_options: {
+ unit_test: true,
+ },
}
rust_test {
diff --git a/Cargo.toml b/Cargo.toml
index d50b1a3..b27e88f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,11 +13,11 @@
[package]
edition = "2018"
name = "futures-core"
-version = "0.3.7"
+version = "0.3.13"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
description = "The core traits and types in for the `futures` library.\n"
homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-core/0.3.7"
+documentation = "https://docs.rs/futures-core/0.3"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
[package.metadata.docs.rs]
@@ -26,6 +26,8 @@
[dependencies]
+[dev-dependencies]
+
[features]
alloc = []
cfg-target-has-atomic = []
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 446b316..55601db 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,12 +1,12 @@
[package]
name = "futures-core"
edition = "2018"
-version = "0.3.7"
+version = "0.3.13"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
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-core/0.3.7"
+documentation = "https://docs.rs/futures-core/0.3"
description = """
The core traits and types in for the `futures` library.
"""
@@ -24,6 +24,9 @@
[dependencies]
+[dev-dependencies]
+futures = { path = "../futures" }
+
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
diff --git a/METADATA b/METADATA
index 0171ad8..39e1a12 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/futures-core/futures-core-0.3.7.crate"
+ value: "https://static.crates.io/crates/futures-core/futures-core-0.3.13.crate"
}
- version: "0.3.7"
+ version: "0.3.13"
license_type: NOTICE
last_upgrade_date {
- year: 2020
- month: 10
- day: 25
+ year: 2021
+ month: 3
+ day: 4
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 99c731f..8052406 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,11 +1,59 @@
-// Generated by cargo2android.py for tests in Android.bp
+// Generated by update_crate_tests.py for tests that depend on this crate.
{
"presubmit": [
{
+ "name": "anyhow_device_test_tests_test_repr"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_convert"
+ },
+ {
+ "name": "anyhow_device_test_src_lib"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_chain"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_boxed"
+ },
+ {
+ "name": "tokio-test_device_test_tests_macros"
+ },
+ {
+ "name": "tokio-test_device_test_tests_block_on"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_downcast"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_context"
+ },
+ {
"name": "futures-core_device_test_src_lib"
},
{
"name": "futures-util_device_test_src_lib"
+ },
+ {
+ "name": "tokio-test_device_test_tests_io"
+ },
+ {
+ "name": "tokio-test_device_test_src_lib"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_macros"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_ffi"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_fmt"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_autotrait"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_source"
}
]
}
diff --git a/src/future.rs b/src/future.rs
index 35a0fd3..d9327c0 100644
--- a/src/future.rs
+++ b/src/future.rs
@@ -4,6 +4,7 @@
use core::pin::Pin;
use core::task::{Context, Poll};
+#[doc(no_inline)]
pub use core::future::Future;
/// An owned dynamically typed [`Future`] for use in cases where you can't
@@ -79,7 +80,7 @@
type Error = E;
#[inline]
- fn try_poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<F::Output> {
+ fn try_poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
self.poll(cx)
}
}
diff --git a/src/lib.rs b/src/lib.rs
index 17654e6..ec14adb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,16 +8,8 @@
// 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)]
-
-// mem::take requires Rust 1.40, matches! requires Rust 1.42
-// Can be removed if the minimum supported version increased or if https://github.com/rust-lang/rust-clippy/issues/3941
-// get's implemented.
-#![allow(clippy::mem_replace_with_default, clippy::match_like_matches_macro)]
-
#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
-#![doc(html_root_url = "https://docs.rs/futures-core/0.3.7")]
-
#[cfg(all(feature = "cfg-target-has-atomic", not(feature = "unstable")))]
compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feature as an explicit opt-in to unstable features");
diff --git a/src/task/__internal/atomic_waker.rs b/src/task/__internal/atomic_waker.rs
index 506737e..213355b 100644
--- a/src/task/__internal/atomic_waker.rs
+++ b/src/task/__internal/atomic_waker.rs
@@ -53,7 +53,7 @@
///
/// impl Flag {
/// pub fn new() -> Self {
-/// Flag(Arc::new(Inner {
+/// Self(Arc::new(Inner {
/// waker: AtomicWaker::new(),
/// set: AtomicBool::new(false),
/// }))
@@ -202,7 +202,7 @@
trait AssertSync: Sync {}
impl AssertSync for Waker {}
- AtomicWaker {
+ Self {
state: AtomicUsize::new(WAITING),
waker: UnsafeCell::new(None),
}
@@ -259,7 +259,11 @@
/// }
/// ```
pub fn register(&self, waker: &Waker) {
- match self.state.compare_and_swap(WAITING, REGISTERING, Acquire) {
+ match self
+ .state
+ .compare_exchange(WAITING, REGISTERING, Acquire, Acquire)
+ .unwrap_or_else(|x| x)
+ {
WAITING => {
unsafe {
// Locked acquired, update the waker cell
@@ -398,7 +402,7 @@
impl Default for AtomicWaker {
fn default() -> Self {
- AtomicWaker::new()
+ Self::new()
}
}
diff --git a/src/task/mod.rs b/src/task/mod.rs
index 362b376..f945d5d 100644
--- a/src/task/mod.rs
+++ b/src/task/mod.rs
@@ -6,4 +6,5 @@
#[doc(hidden)]
pub mod __internal;
+#[doc(no_inline)]
pub use core::task::{Context, Poll, Waker, RawWaker, RawWakerVTable};