Skip to content

Commit 242c6d7

Browse files
committed
Fix ui tests
1 parent ff65bec commit 242c6d7

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

futures/testcrate/ui/move-captured-variable.stderr

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
error[E0507]: cannot move out of captured variable in an `FnMut` closure
1+
error[E0507]: cannot move out of `a`, a captured variable in an `FnMut` closure
22
--> $DIR/move-captured-variable.rs:10:9
33
|
44
8 | let a = String::new();
55
| - captured outer variable
66
9 | foo(|| {
77
10 | / async_stream_block! {
88
11 | | yield a
9+
| | -
10+
| | |
11+
| | move occurs because `a` has type `std::string::String`, which does not implement the `Copy` trait
12+
| | move occurs due to use in generator
913
12 | | };
10-
| |__________^ cannot move out of captured variable in an `FnMut` closure
14+
| |__________^ move out of `a` occurs here
1115

1216
error: aborting due to previous error
1317

futures/testcrate/ui/nested.stderr

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
error[E0727]: `async` generators are not yet supported
2-
--> $DIR/nested.rs:7:19
2+
--> $DIR/nested.rs:10:13
33
|
4-
7 | let _ = async {
5-
| ___________________^
6-
8 | | #[for_await]
7-
9 | | for i in stream::iter(vec![1, 2]) {
8-
10 | | yield i * i;
9-
11 | | }
10-
12 | | };
11-
| |_____^
4+
10 | yield i * i;
5+
| ^^^^^^^^^^^
126

137
error: aborting due to previous error
148

futures/testcrate/ui/update-all-references.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#
1919
# See all `update-references.sh`, if you just want to update a single test.
2020

21-
MY_DIR="$(dirname "${BASH_SOURCE[0]}")"
21+
MY_DIR=$(dirname $0)
2222
cd $MY_DIR
2323
find . -name '*.rs' | xargs ./update-references.sh
24+
cd -

futures/testcrate/ui/update-references.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# If you find yourself manually editing a foo.stderr file, you're
2020
# doing it wrong.
2121

22-
MYDIR="$(dirname "${BASH_SOURCE[0]}")"
22+
MYDIR=$(dirname $0)
2323

2424
BUILD_DIR="../target/tests/ui"
2525

0 commit comments

Comments
 (0)