aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid LeGare <legare@google.com>2022-06-23 16:13:43 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-23 16:13:43 +0000
commitd1c5a0d3556d7d7fbc6b428c2c095e0affb93a2c (patch)
treebcb37cadef5cb9b6781173d5de811dd4f3e4f475
parent5f9a90afd9c88cbfd7a1b44669aca3aedf72a24d (diff)
parent810d944fbedbf6927069330a2987c6346466871e (diff)
downloadasync-stream-d1c5a0d3556d7d7fbc6b428c2c095e0affb93a2c.tar.gz
Upgrade rust/crates/async-stream to 0.3.3 am: cc30cebdc1 am: 810d944fbe
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/async-stream/+/2132690 Change-Id: I8c57537e47117fa1b850b59fd16ee7a03f14fc31 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp2
-rw-r--r--CHANGELOG.md4
-rw-r--r--Cargo.lock255
-rw-r--r--Cargo.toml22
-rw-r--r--Cargo.toml.orig11
-rw-r--r--METADATA6
-rw-r--r--README.md1
-rw-r--r--tests/stream.rs5
-rw-r--r--tests/try_stream.rs7
-rw-r--r--tests/ui/yield_bad_expr_in_macro.stderr2
-rw-r--r--tests/ui/yield_in_async.stderr63
-rw-r--r--tests/ui/yield_in_closure.stderr22
-rw-r--r--tests/ui/yield_in_nested_fn.stderr7
14 files changed, 205 insertions, 209 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 620b2af..7d3290f 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "b28da881695e3c66e1782f0c2c330d4e162eb7c2"
- }
-}
+ "sha1": "e1373e4dede24f7700452e499a46561fb45ea515"
+ },
+ "path_in_vcs": "async-stream"
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 18934f1..d48bba7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -23,7 +23,7 @@ rust_library {
host_supported: true,
crate_name: "async_stream",
cargo_env_compat: true,
- cargo_pkg_version: "0.3.2",
+ cargo_pkg_version: "0.3.3",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd7f60f..8e5afdc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.3.3
+
+* Fix a bug where `yield` and `?` cannot be used on the same line (#66)
+
# 0.3.2
* Expand `yield` in internal macro calls (#57)
diff --git a/Cargo.lock b/Cargo.lock
index 1cdf89d..be011ef 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,11 +14,12 @@ dependencies = [
[[package]]
name = "async-stream"
-version = "0.3.2"
+version = "0.3.3"
dependencies = [
"async-stream-impl",
"futures-core",
"futures-util",
+ "rustversion",
"tokio",
"tokio-test",
"trybuild",
@@ -26,9 +27,9 @@ dependencies = [
[[package]]
name = "async-stream-impl"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308"
+checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
dependencies = [
"proc-macro2",
"quote",
@@ -36,22 +37,16 @@ dependencies = [
]
[[package]]
-name = "autocfg"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
-
-[[package]]
name = "bitflags"
-version = "1.2.1"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bytes"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
+checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
[[package]]
name = "cfg-if"
@@ -61,18 +56,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "futures-core"
-version = "0.3.15"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1"
+checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
[[package]]
name = "futures-macro"
-version = "0.3.15"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121"
+checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
dependencies = [
- "autocfg",
- "proc-macro-hack",
"proc-macro2",
"quote",
"syn",
@@ -80,24 +73,21 @@ dependencies = [
[[package]]
name = "futures-task"
-version = "0.3.15"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae"
+checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
[[package]]
name = "futures-util"
-version = "0.3.15"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967"
+checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
dependencies = [
- "autocfg",
"futures-core",
"futures-macro",
"futures-task",
"pin-project-lite",
"pin-utils",
- "proc-macro-hack",
- "proc-macro-nested",
"slab",
]
@@ -109,45 +99,30 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hermit-abi"
-version = "0.1.18"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]]
-name = "instant"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
name = "itoa"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
-
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
[[package]]
name = "libc"
-version = "0.2.94"
+version = "0.2.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
+checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
[[package]]
name = "lock_api"
-version = "0.4.4"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb"
+checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
dependencies = [
"scopeguard",
]
@@ -163,20 +138,21 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
[[package]]
name = "mio"
-version = "0.7.11"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956"
+checksum = "7ba42135c6a5917b9db9cd7b293e5409e1c6b041e6f9825e92e55a894c63b6f8"
dependencies = [
"libc",
"log",
"miow",
"ntapi",
+ "wasi",
"winapi",
]
@@ -191,18 +167,18 @@ dependencies = [
[[package]]
name = "ntapi"
-version = "0.3.6"
+version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
+checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
dependencies = [
"winapi",
]
[[package]]
name = "num_cpus"
-version = "1.13.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
dependencies = [
"hermit-abi",
"libc",
@@ -210,40 +186,38 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.7.2"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"
+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
[[package]]
name = "parking_lot"
-version = "0.11.1"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
+checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
dependencies = [
- "instant",
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
-version = "0.8.3"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
+checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"
dependencies = [
"cfg-if",
- "instant",
"libc",
"redox_syscall",
"smallvec",
- "winapi",
+ "windows-sys",
]
[[package]]
name = "pin-project-lite"
-version = "0.2.6"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
+checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]]
name = "pin-utils"
@@ -252,49 +226,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
-name = "proc-macro-hack"
-version = "0.5.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
-
-[[package]]
-name = "proc-macro-nested"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
-
-[[package]]
name = "proc-macro2"
-version = "1.0.27"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
[[package]]
name = "quote"
-version = "1.0.9"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
+checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]
[[package]]
name = "redox_syscall"
-version = "0.2.8"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
+checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"
dependencies = [
"bitflags",
]
[[package]]
+name = "rustversion"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
+
+[[package]]
name = "ryu"
-version = "1.0.5"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
[[package]]
name = "scopeguard"
@@ -304,18 +272,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "serde"
-version = "1.0.126"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.126"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
dependencies = [
"proc-macro2",
"quote",
@@ -324,9 +292,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.64"
+version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
+checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
dependencies = [
"itoa",
"ryu",
@@ -335,30 +303,40 @@ dependencies = [
[[package]]
name = "signal-hook-registry"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6"
+checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
dependencies = [
"libc",
]
[[package]]
name = "slab"
-version = "0.4.3"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527"
+checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
[[package]]
name = "smallvec"
-version = "1.6.1"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
+
+[[package]]
+name = "socket2"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
+checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
+dependencies = [
+ "libc",
+ "winapi",
+]
[[package]]
name = "syn"
-version = "1.0.72"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
+checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",
@@ -367,20 +345,19 @@ dependencies = [
[[package]]
name = "termcolor"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
+checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
dependencies = [
"winapi-util",
]
[[package]]
name = "tokio"
-version = "1.6.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd3076b5c8cc18138b8f8814895c11eb4de37114a5d127bafdc5e55798ceef37"
+checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee"
dependencies = [
- "autocfg",
"bytes",
"libc",
"memchr",
@@ -390,15 +367,16 @@ dependencies = [
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
+ "socket2",
"tokio-macros",
"winapi",
]
[[package]]
name = "tokio-macros"
-version = "1.2.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c49e3df43841dafb86046472506755d8501c5615673955f6aa17181125d13c37"
+checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
dependencies = [
"proc-macro2",
"quote",
@@ -407,9 +385,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8864d706fdb3cc0843a49647ac892720dac98a6eeb818b77190592cf4994066"
+checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -440,12 +418,12 @@ dependencies = [
[[package]]
name = "trybuild"
-version = "1.0.42"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1768998d9a3b179411618e377dbb134c58a88cda284b0aa71c42c40660127d46"
+checksum = "2d60539445867cdd9680b2bfe2d0428f1814b7d5c9652f09d8d3eae9d19308db"
dependencies = [
"glob",
- "lazy_static",
+ "once_cell",
"serde",
"serde_json",
"termcolor",
@@ -459,6 +437,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -488,3 +472,46 @@ name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
+dependencies = [
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
diff --git a/Cargo.toml b/Cargo.toml
index a2d9ba7..fbe71c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,32 +3,34 @@
# 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"
+rust-version = "1.45"
name = "async-stream"
-version = "0.3.2"
+version = "0.3.3"
authors = ["Carl Lerche <me@carllerche.com>"]
description = "Asynchronous streams using async & await notation"
-homepage = "https://github.com/tokio-rs/async-stream"
-documentation = "https://docs.rs/async-stream"
-readme = "README.md"
license = "MIT"
repository = "https://github.com/tokio-rs/async-stream"
+
[dependencies.async-stream-impl]
-version = "=0.3.2"
+version = "=0.3.3"
[dependencies.futures-core]
version = "0.3"
+
[dev-dependencies.futures-util]
version = "0.3"
+[dev-dependencies.rustversion]
+version = "1"
+
[dev-dependencies.tokio]
version = "1"
features = ["full"]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 06ccf45..2f31b77 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,26 +1,23 @@
[package]
name = "async-stream"
# When releasing to crates.io:
-# - Update version number
-# - README.md
# - Update CHANGELOG.md
# - Create git tag
-version = "0.3.2"
+version = "0.3.3"
edition = "2018"
+rust-version = "1.45"
license = "MIT"
authors = ["Carl Lerche <me@carllerche.com>"]
description = "Asynchronous streams using async & await notation"
-documentation = "https://docs.rs/async-stream"
-homepage = "https://github.com/tokio-rs/async-stream"
repository = "https://github.com/tokio-rs/async-stream"
-readme = "README.md"
[dependencies]
-async-stream-impl = { version = "=0.3.2", path = "../async-stream-impl" }
+async-stream-impl = { version = "=0.3.3", path = "../async-stream-impl" }
futures-core = "0.3"
[dev-dependencies]
futures-util = "0.3"
+rustversion = "1"
tokio = { version = "1", features = ["full"] }
tokio-test = "0.4"
trybuild = "1"
diff --git a/METADATA b/METADATA
index 0ad5312..96f555d 100644
--- a/METADATA
+++ b/METADATA
@@ -7,12 +7,12 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/async-stream/async-stream-0.3.2.crate"
+ value: "https://static.crates.io/crates/async-stream/async-stream-0.3.3.crate"
}
- version: "0.3.2"
+ version: "0.3.3"
license_type: NOTICE
last_upgrade_date {
- year: 2021
+ year: 2022
month: 6
day: 21
}
diff --git a/README.md b/README.md
index 77c7739..1c16226 100644
--- a/README.md
+++ b/README.md
@@ -151,6 +151,7 @@ caller.
[`Stream`]: https://docs.rs/futures-core/*/futures_core/stream/trait.Stream.html
## Supported Rust Versions
+
`async-stream` is built against the latest stable release. The minimum supported version is 1.45 due to [function-like procedural macros in expression, pattern, and statement positions](https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#stabilizing-function-like-procedural-macros-in-expressions-patterns-and-statements).
## License
diff --git a/tests/stream.rs b/tests/stream.rs
index 77b3813..4e26a3d 100644
--- a/tests/stream.rs
+++ b/tests/stream.rs
@@ -11,7 +11,7 @@ async fn noop_stream() {
let s = stream! {};
pin_mut!(s);
- while let Some(_) = s.next().await {
+ while s.next().await.is_some() {
unreachable!();
}
}
@@ -28,7 +28,7 @@ async fn empty_stream() {
};
pin_mut!(s);
- while let Some(_) = s.next().await {
+ while s.next().await.is_some() {
unreachable!();
}
}
@@ -229,6 +229,7 @@ fn inner_try_stream() {
};
}
+#[rustversion::attr(not(stable), ignore)]
#[test]
fn test() {
let t = trybuild::TestCases::new();
diff --git a/tests/try_stream.rs b/tests/try_stream.rs
index 063e37a..06dcc3d 100644
--- a/tests/try_stream.rs
+++ b/tests/try_stream.rs
@@ -78,3 +78,10 @@ async fn multi_try() {
values
);
}
+
+#[allow(unused)]
+fn issue_65() -> impl Stream<Item = Result<u32, ()>> {
+ try_stream! {
+ yield Err(())?;
+ }
+}
diff --git a/tests/ui/yield_bad_expr_in_macro.stderr b/tests/ui/yield_bad_expr_in_macro.stderr
index 71d9075..e70e200 100644
--- a/tests/ui/yield_bad_expr_in_macro.stderr
+++ b/tests/ui/yield_bad_expr_in_macro.stderr
@@ -1,5 +1,5 @@
error: expected expression
- --> $DIR/yield_bad_expr_in_macro.rs:8:33
+ --> tests/ui/yield_bad_expr_in_macro.rs:8:33
|
8 | _ = work() => yield fn f() {},
| ^^
diff --git a/tests/ui/yield_in_async.stderr b/tests/ui/yield_in_async.stderr
index 19691eb..11d2ca1 100644
--- a/tests/ui/yield_in_async.stderr
+++ b/tests/ui/yield_in_async.stderr
@@ -1,5 +1,5 @@
error[E0658]: yield syntax is experimental
- --> $DIR/yield_in_async.rs:6:13
+ --> tests/ui/yield_in_async.rs:6:13
|
6 | yield 123;
| ^^^^^^^^^
@@ -7,13 +7,13 @@ error[E0658]: yield syntax is experimental
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
error[E0727]: `async` generators are not yet supported
- --> $DIR/yield_in_async.rs:6:13
+ --> tests/ui/yield_in_async.rs:6:13
|
6 | yield 123;
| ^^^^^^^^^
error[E0271]: type mismatch resolving `<[static generator@$DIR/src/lib.rs:201:9: 201:67] as Generator<ResumeTy>>::Yield == ()`
- --> $DIR/yield_in_async.rs:4:5
+ --> tests/ui/yield_in_async.rs:4:5
|
4 | / stream! {
5 | | let f = async {
@@ -22,54 +22,11 @@ error[E0271]: type mismatch resolving `<[static generator@$DIR/src/lib.rs:201:9:
8 | |
9 | | let v = f.await;
10 | | };
- | |______^ expected `()`, found integer
+ | |_____^ expected `()`, found integer
|
- = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0698]: type inside `async` block must be known in this context
- --> $DIR/yield_in_async.rs:6:19
- |
-6 | yield 123;
- | ^^^ cannot infer type for type `{integer}`
- |
-note: the type is part of the `async` block because of this `yield`
- --> $DIR/yield_in_async.rs:6:13
- |
-6 | yield 123;
- | ^^^^^^^^^
-
-error[E0698]: type inside `async` block must be known in this context
- --> $DIR/yield_in_async.rs:5:13
- |
-5 | let f = async {
- | ^ cannot infer type for type `{integer}`
- |
-note: the type is part of the `async` block because of this `await`
- --> $DIR/yield_in_async.rs:9:17
- |
-9 | let v = f.await;
- | ^^^^^^^
-
-error[E0698]: type inside `async` block must be known in this context
- --> $DIR/yield_in_async.rs:9:17
- |
-9 | let v = f.await;
- | ^ cannot infer type for type `{integer}`
- |
-note: the type is part of the `async` block because of this `await`
- --> $DIR/yield_in_async.rs:9:17
- |
-9 | let v = f.await;
- | ^^^^^^^
-
-error[E0698]: type inside `async` block must be known in this context
- --> $DIR/yield_in_async.rs:9:17
- |
-9 | let v = f.await;
- | ^^^^^^^ cannot infer type for type `{integer}`
- |
-note: the type is part of the `async` block because of this `await`
- --> $DIR/yield_in_async.rs:9:17
- |
-9 | let v = f.await;
- | ^^^^^^^
+note: required by a bound in `from_generator`
+ --> $RUST/core/src/future/mod.rs
+ |
+ | T: Generator<ResumeTy, Yield = ()>,
+ | ^^^^^^^^^^ required by this bound in `from_generator`
+ = note: this error originates in the macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/yield_in_closure.stderr b/tests/ui/yield_in_closure.stderr
index 2506e18..fb52f80 100644
--- a/tests/ui/yield_in_closure.stderr
+++ b/tests/ui/yield_in_closure.stderr
@@ -1,5 +1,5 @@
error[E0658]: yield syntax is experimental
- --> $DIR/yield_in_closure.rs:7:17
+ --> tests/ui/yield_in_closure.rs:7:17
|
7 | yield v;
| ^^^^^^^
@@ -7,12 +7,14 @@ error[E0658]: yield syntax is experimental
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
error[E0277]: expected a `FnOnce<(&str,)>` closure, found `[generator@$DIR/src/lib.rs:201:9: 201:67]`
- --> $DIR/yield_in_closure.rs:6:14
- |
-6 | .and_then(|v| {
- | ^^^^^^^^ expected an `FnOnce<(&str,)>` closure, found `[generator@$DIR/src/lib.rs:201:9: 201:67]`
- |
- = help: the trait `FnOnce<(&str,)>` is not implemented for `[generator@$DIR/src/lib.rs:201:9: 201:67]`
-
-Some errors have detailed explanations: E0277, E0658.
-For more information about an error, try `rustc --explain E0277`.
+ --> tests/ui/yield_in_closure.rs:6:14
+ |
+6 | .and_then(|v| {
+ | ^^^^^^^^ expected an `FnOnce<(&str,)>` closure, found `[generator@$DIR/src/lib.rs:201:9: 201:67]`
+ |
+ = help: the trait `FnOnce<(&str,)>` is not implemented for `[generator@$DIR/src/lib.rs:201:9: 201:67]`
+note: required by a bound in `Result::<T, E>::and_then`
+ --> $RUST/core/src/result.rs
+ |
+ | pub fn and_then<U, F: FnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Result::<T, E>::and_then`
diff --git a/tests/ui/yield_in_nested_fn.stderr b/tests/ui/yield_in_nested_fn.stderr
index a562555..54fdee9 100644
--- a/tests/ui/yield_in_nested_fn.stderr
+++ b/tests/ui/yield_in_nested_fn.stderr
@@ -1,5 +1,5 @@
error[E0658]: yield syntax is experimental
- --> $DIR/yield_in_nested_fn.rs:6:13
+ --> tests/ui/yield_in_nested_fn.rs:6:13
|
6 | yield "hello";
| ^^^^^^^^^^^^^
@@ -7,10 +7,7 @@ error[E0658]: yield syntax is experimental
= note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
error[E0627]: yield expression outside of generator literal
- --> $DIR/yield_in_nested_fn.rs:6:13
+ --> tests/ui/yield_in_nested_fn.rs:6:13
|
6 | yield "hello";
| ^^^^^^^^^^^^^
-
-Some errors have detailed explanations: E0627, E0658.
-For more information about an error, try `rustc --explain E0627`.