Skip to content

Commit b18a27a

Browse files
committed
Fix ui tests
1 parent 842b815 commit b18a27a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
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/update-all-references.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
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

futures/testcrate/ui/update-references.sh

Lines changed: 1 addition & 1 deletion
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)