diff options
| author | Eric Holk <ericholk@microsoft.com> | 2023-12-19 12:22:41 -0800 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2023-12-22 11:01:07 -0800 |
| commit | aaa3e7642b950f9749ec2c19da86f4f29fcfd2f0 (patch) | |
| tree | e965c1d49ca52640bc11dca3bc7068ef1eb72892 /tests/ui/async-await/for-await-consumes-iter.stderr | |
| parent | acb6f17adf78f79db10ec189d719380d35cacee7 (diff) | |
| download | rust-aaa3e7642b950f9749ec2c19da86f4f29fcfd2f0.tar.gz rust-aaa3e7642b950f9749ec2c19da86f4f29fcfd2f0.zip | |
Update test outputs
Diffstat (limited to 'tests/ui/async-await/for-await-consumes-iter.stderr')
| -rw-r--r-- | tests/ui/async-await/for-await-consumes-iter.stderr | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/ui/async-await/for-await-consumes-iter.stderr b/tests/ui/async-await/for-await-consumes-iter.stderr index 48b2e8a51d8..a3e5bbcabf5 100644 --- a/tests/ui/async-await/for-await-consumes-iter.stderr +++ b/tests/ui/async-await/for-await-consumes-iter.stderr @@ -5,22 +5,17 @@ LL | let iter = core::async_iter::from_iter(0..3); | ---- move occurs because `iter` has type `FromIter<std::ops::Range<i32>>`, which does not implement the `Copy` trait LL | let mut count = 0; LL | for await i in iter { - | ------------------- - | | | - | | value moved here - | inside of this loop + | ---- `iter` moved due to this method call ... LL | for await i in iter { | ^^^^ value used here after move | -help: consider cloning the value if the performance cost is acceptable +note: `into_async_iter` takes ownership of the receiver `self`, which moves `iter` + --> $SRC_DIR/core/src/async_iter/async_iter.rs:LL:COL +help: you can `clone` the value and consume it, but this might not be your desired behavior | LL | for await i in iter.clone() { | ++++++++ -help: borrow this binding in the pattern to avoid moving the value - | -LL | for await i in ref iter { - | +++ error: aborting due to 1 previous error |
