Skip to content

Commit

Permalink
Update ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Apr 27, 2019
1 parent 00f51ab commit 3ecd7bc
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 245 deletions.
81 changes: 74 additions & 7 deletions futures/testcrate/ui/bad-input.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,81 @@
error: attribute must be of the form `#[for_await]`
error[E0464]: multiple matching crates for `futures`
--> $DIR/bad-input.rs:4:5
|
4 | use futures::*;
| ^^^^^^^
|
= note: candidates:
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib

error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/bad-input.rs:14:3
|
14 | #[async_stream(baz)]
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0658]: attributes on expressions are experimental
--> $DIR/bad-input.rs:16:5
|
16 | #[for_await]
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/15701
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable

error[E0658]: The attribute `for_await` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/bad-input.rs:16:7
|
16 | #[for_await]
| ^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/bad-input.rs:6:3
|
6 | #[async_stream]
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0658]: attributes on expressions are experimental
--> $DIR/bad-input.rs:8:5
|
8 | #[for_await(bar)]
| ^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/15701
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable

error: attribute must be of the form `#[async_stream]`
--> $DIR/bad-input.rs:14:1
|
14 | #[async_stream(baz)]
| ^^^^^^^^^^^^^^^^^^^^
error[E0658]: The attribute `for_await` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/bad-input.rs:8:7
|
8 | #[for_await(bar)]
| ^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0462]: found staticlib `futures` instead of rlib or dylib
--> $DIR/bad-input.rs:4:5
|
4 | use futures::*;
| ^^^^^^^
|
= help: please recompile that crate using --crate-type lib
= note: the following crate versions were found:
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib

error: aborting due to 2 previous errors
error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0658`.
156 changes: 35 additions & 121 deletions futures/testcrate/ui/bad-return-type.stderr
Original file line number Diff line number Diff line change
@@ -1,131 +1,45 @@
error[E0308]: mismatched types
--> $DIR/bad-return-type.rs:13:11
|
13 | yield val;
| ^^^
| |
| expected enum `std::option::Option`, found integer
| help: try using a variant of the expected type: `Some(val)`
|
= note: expected type `std::option::Option<_>`
found type `{integer}`

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:7:9
error[E0464]: multiple matching crates for `futures`
--> $DIR/bad-return-type.rs:3:5
|
7 | let val = Some(42);
| ^^^
3 | use futures::*;
| ^^^^^^^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:5:1
|
5 | #[async_stream]
| ^^^^^^^^^^^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:12:9
|
12 | let val = val.unwrap();
| ^^^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:5:1
|
5 | #[async_stream]
| ^^^^^^^^^^^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:13:11
|
13 | yield val;
| ^^^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:5:1
|
5 | #[async_stream]
| ^^^^^^^^^^^^^^^

error[E0308]: mismatched types
--> $DIR/bad-return-type.rs:21:11
|
21 | yield (1, 2)
| ^^^^^^ expected integer, found tuple
|
= note: expected type `{integer}`
found type `({integer}, {integer})`

error[E0271]: type mismatch resolving `<impl futures_core::stream::Stream as futures_core::stream::Stream>::Item == (i32, i32)`
--> $DIR/bad-return-type.rs:17:15
|
17 | fn tuple() -> (i32, i32) {
| ^^^^^^^^^^ expected integer, found tuple
|
= note: expected type `{integer}`
found type `(i32, i32)`
= note: the return type of a function must have a statically known size

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:16:1
|
16 | #[async_stream]
| ^^^^^^^^^^^^^^^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:16:1
|
16 | #[async_stream]
| ^^^^^^^^^^^^^^^
= note: candidates:
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:19:15
|
19 | yield 3;
| ^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:16:1
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/bad-return-type.rs:16:3
|
16 | #[async_stream]
| ^^^^^^^^^^^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:21:12
| ^^^^^^^^^^^^
|
21 | yield (1, 2)
| ^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:16:1
|
16 | #[async_stream]
| ^^^^^^^^^^^^^^^
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:21:15
|
21 | yield (1, 2)
| ^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:16:1
|
16 | #[async_stream]
| ^^^^^^^^^^^^^^^
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/bad-return-type.rs:5:3
|
5 | #[async_stream]
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-return-type.rs:21:11
|
21 | yield (1, 2)
| ^^^^^^
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-return-type.rs:16:1
|
16 | #[async_stream]
| ^^^^^^^^^^^^^^^
error[E0462]: found staticlib `futures` instead of rlib or dylib
--> $DIR/bad-return-type.rs:3:5
|
3 | use futures::*;
| ^^^^^^^
|
= help: please recompile that crate using --crate-type lib
= note: the following crate versions were found:
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib

error: aborting due to 11 previous errors
error: aborting due to 4 previous errors

Some errors have detailed explanations: E0271, E0308.
For more information about an error, try `rustc --explain E0271`.
For more information about this error, try `rustc --explain E0658`.
42 changes: 32 additions & 10 deletions futures/testcrate/ui/forget-semicolon.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
error[E0308]: mismatched types
--> $DIR/forget-semicolon.rs:8:5
error[E0464]: multiple matching crates for `futures`
--> $DIR/forget-semicolon.rs:3:5
|
8 | Some(())
| ^^^^^^^^- help: try adding a semicolon: `;`
| |
| expected (), found enum `std::option::Option`
3 | use futures::*;
| ^^^^^^^
|
= note: expected type `()`
found type `std::option::Option<()>`
= note: candidates:
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib

error: aborting due to previous error
error[E0658]: The attribute `async_stream` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/forget-semicolon.rs:5:3
|
5 | #[async_stream]
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0462]: found staticlib `futures` instead of rlib or dylib
--> $DIR/forget-semicolon.rs:3:5
|
3 | use futures::*;
| ^^^^^^^
|
= help: please recompile that crate using --crate-type lib
= note: the following crate versions were found:
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.
For more information about this error, try `rustc --explain E0658`.
36 changes: 24 additions & 12 deletions futures/testcrate/ui/move-captured-variable.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
error[E0507]: cannot move out of 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
12 | | };
| |__________^ cannot move out of captured variable in an `FnMut` closure
error[E0464]: multiple matching crates for `futures`
--> $DIR/move-captured-variable.rs:3:5
|
3 | use futures::*;
| ^^^^^^^
|
= note: candidates:
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-ab3575aa90d1182f.rlib
crate `futures`: /?/C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/libfutures-de463abd0441f2c0.rlib

error: aborting due to previous error
error[E0462]: found staticlib `futures` instead of rlib or dylib
--> $DIR/move-captured-variable.rs:3:5
|
3 | use futures::*;
| ^^^^^^^
|
= help: please recompile that crate using --crate-type lib
= note: the following crate versions were found:
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-6fe61ad28e230c4f.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-c9208ab326ad6843.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_async_macro-ef27c17cb2f8782e.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-64b799643d932556.dll.lib
crate `futures`: C:/Users/tajmi/rust/local/futures-rs/futures/testcrate/target/debug/deps/futures_select_macro-6cda628dd9ad7c4f.dll.lib

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0507`.
Loading

0 comments on commit 3ecd7bc

Please sign in to comment.