Skip to content

Commit

Permalink
Fix ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 27, 2019
1 parent 66b3ef9 commit 380ddc5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
8 changes: 6 additions & 2 deletions futures/testcrate/ui/move-captured-variable.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
error[E0507]: cannot move out of captured variable in an `FnMut` closure
error[E0507]: cannot move out of `a`, a captured variable in an `FnMut` closure
--> $DIR/move-captured-variable.rs:10:9
|
8 | let a = String::new();
| - captured outer variable
9 | foo(|| {
10 | / async_stream_block! {
11 | | yield a
| | -
| | |
| | move occurs because `a` has type `std::string::String`, which does not implement the `Copy` trait
| | move occurs due to use in generator
12 | | };
| |__________^ cannot move out of captured variable in an `FnMut` closure
| |__________^ move out of `a` occurs here

error: aborting due to previous error

Expand Down
12 changes: 3 additions & 9 deletions futures/testcrate/ui/nested.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
error[E0727]: `async` generators are not yet supported
--> $DIR/nested.rs:7:19
--> $DIR/nested.rs:10:13
|
7 | let _ = async {
| ___________________^
8 | | #[for_await]
9 | | for i in stream::iter(vec![1, 2]) {
10 | | yield i * i;
11 | | }
12 | | };
| |_____^
10 | yield i * i;
| ^^^^^^^^^^^

error: aborting due to previous error

3 changes: 2 additions & 1 deletion futures/testcrate/ui/update-all-references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
# See all `update-references.sh`, if you just want to update a single test.

MY_DIR="$(dirname "${BASH_SOURCE[0]}")"
MY_DIR=$(dirname $0)
cd $MY_DIR
find . -name '*.rs' | xargs ./update-references.sh
cd -
2 changes: 1 addition & 1 deletion futures/testcrate/ui/update-references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# If you find yourself manually editing a foo.stderr file, you're
# doing it wrong.

MYDIR="$(dirname "${BASH_SOURCE[0]}")"
MYDIR=$(dirname $0)

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

Expand Down

0 comments on commit 380ddc5

Please sign in to comment.