Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ui test failure #20

Merged
merged 1 commit into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 43 additions & 46 deletions tests/ui/bad-item-type.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
error[E0308]: mismatched types
--> $DIR/bad-item-type.rs:15:11
|
15 | yield val; //~ ERROR mismatched types
| ^^^
| |
| 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}`
--> $DIR/bad-item-type.rs:15:11
|
15| yield val; //~ ERROR mismatched types
| ^^^
| |
| 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-item-type.rs:9:9
Expand All @@ -23,47 +23,47 @@ note: the type is part of the generator because of this `yield`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-item-type.rs:14:9
|
14 | let val = val.unwrap();
| ^^^ cannot infer type for `{integer}`
|
--> $DIR/bad-item-type.rs:14:9
|
14| let val = val.unwrap();
| ^^^ cannot infer type for `{integer}`
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-item-type.rs:7:1
|
7 | #[async_stream(item = Option<i32>)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> $DIR/bad-item-type.rs:7:1
|
7 | #[async_stream(item = Option<i32>)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/bad-item-type.rs:15:11
|
15 | yield val; //~ ERROR mismatched types
| ^^^ cannot infer type for `{integer}`
|
--> $DIR/bad-item-type.rs:15:11
|
15| yield val; //~ ERROR mismatched types
| ^^^ cannot infer type for `{integer}`
|
note: the type is part of the generator because of this `yield`
--> $DIR/bad-item-type.rs:7:1
|
7 | #[async_stream(item = Option<i32>)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> $DIR/bad-item-type.rs:7:1
|
7 | #[async_stream(item = Option<i32>)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
--> $DIR/bad-item-type.rs:23:11
|
23 | yield (1, 2) //~ ERROR mismatched types
| ^^^^^^ expected integer, found tuple
|
= note: expected type `{integer}`
found type `({integer}, {integer})`
--> $DIR/bad-item-type.rs:23:11
|
23| yield (1, 2) //~ ERROR mismatched types
| ^^^^^^ 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-item-type.rs:18:23
|
18 | #[async_stream(item = (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
--> $DIR/bad-item-type.rs:18:23
|
18| #[async_stream(item = (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-item-type.rs:18:1
Expand Down Expand Up @@ -124,6 +124,3 @@ note: the type is part of the generator because of this `yield`
|
18 | #[async_stream(item = (i32, i32))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0271, E0308, E0698.
For more information about an error, try `rustc --explain E0271`.
20 changes: 9 additions & 11 deletions tests/ui/forget-semicolon.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
error[E0308]: mismatched types
--> $DIR/forget-semicolon.rs:10:5
|
10 | Some(()) //~ ERROR mismatched types
| ^^^^^^^^- help: try adding a semicolon: `;`
| |
| expected (), found enum `std::option::Option`
|
= note: expected type `()`
found type `std::option::Option<()>`

For more information about this error, try `rustc --explain E0308`.
--> $DIR/forget-semicolon.rs:10:5
|
10| Some(()) //~ ERROR mismatched types
| ^^^^^^^^- help: try adding a semicolon: `;`
| |
| expected (), found enum `std::option::Option`
|
= note: expected type `()`
found type `std::option::Option<()>`
83 changes: 28 additions & 55 deletions tests/ui/question-mark-await-type-error.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/question-mark-await-type-error.rs:16:9
|
16 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`
--> $DIR/question-mark-await-type-error.rs:16:9
|
16| async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`

error[E0698]: type inside `async` object must be known in this context
--> $DIR/question-mark-await-type-error.rs:15:15
Expand Down Expand Up @@ -43,18 +43,6 @@ note: the type is part of the `async` object because of this `await`
16 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^^^^^^^^^^

error[E0698]: type inside `async` object must be known in this context
--> $DIR/question-mark-await-type-error.rs:15:15
|
15 | for _i in 1..2 {
| ^^^^ cannot infer type for `{integer}`
|
note: the type is part of the `async` object because of this `await`
--> $DIR/question-mark-await-type-error.rs:16:9
|
16 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^^^^^^^^^^

error[E0698]: type inside `async` object must be known in this context
--> $DIR/question-mark-await-type-error.rs:15:9
|
Expand All @@ -68,22 +56,22 @@ note: the type is part of the `async` object because of this `await`
| ^^^^^^^^^^^^^^

error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/question-mark-await-type-error.rs:29:5
|
29 | #[for_await]
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`
--> $DIR/question-mark-await-type-error.rs:29:5
|
29| #[for_await]
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`

error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/question-mark-await-type-error.rs:23:18
|
23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`
--> $DIR/question-mark-await-type-error.rs:23:18
|
23| async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`

error[E0698]: type inside generator must be known in this context
--> $DIR/question-mark-await-type-error.rs:22:15
Expand Down Expand Up @@ -121,18 +109,6 @@ note: the type is part of the generator because of this `yield`
23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/question-mark-await-type-error.rs:22:15
|
22 | for _i in 1..2 {
| ^^^^ cannot infer type for `{integer}`
|
note: the type is part of the generator because of this `yield`
--> $DIR/question-mark-await-type-error.rs:23:18
|
23 | async {}.await?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
| ^^^^^

error[E0698]: type inside generator must be known in this context
--> $DIR/question-mark-await-type-error.rs:22:9
|
Expand All @@ -146,13 +122,10 @@ note: the type is part of the generator because of this `yield`
| ^^^^^

error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/question-mark-await-type-error.rs:42:18
|
42 | async {}.await?;
| ^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`

Some errors have detailed explanations: E0277, E0698.
For more information about an error, try `rustc --explain E0277`.
--> $DIR/question-mark-await-type-error.rs:42:18
|
42| async {}.await?;
| ^^^^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`
24 changes: 11 additions & 13 deletions tests/ui/threads-sendsync.stderr
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
error[E0277]: `dyn futures_core::stream::Stream<Item = i32>` cannot be sent between threads safely
--> $DIR/threads-sendsync.rs:29:17
|
7 | fn assert_send<T: Send>(_: T) {}
| ----------- ---- required by this bound in `assert_send`
--> $DIR/threads-sendsync.rs:29:17
|
7 | fn assert_send<T: Send>(_: T) {}
| ----------- ---- required by this bound in `assert_send`
...
29 | assert_send(boxed_local()); //~ ERROR `dyn futures_core::stream::Stream<Item = i32>` cannot be sent between threads safely
| ^^^^^^^^^^^^^ `dyn futures_core::stream::Stream<Item = i32>` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `dyn futures_core::stream::Stream<Item = i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn futures_core::stream::Stream<Item = i32>>`
= note: required because it appears within the type `std::boxed::Box<dyn futures_core::stream::Stream<Item = i32>>`
= note: required because it appears within the type `std::pin::Pin<std::boxed::Box<dyn futures_core::stream::Stream<Item = i32>>>`

For more information about this error, try `rustc --explain E0277`.
29| assert_send(boxed_local()); //~ ERROR `dyn futures_core::stream::Stream<Item = i32>` cannot be sent between threads safely
| ^^^^^^^^^^^^^ `dyn futures_core::stream::Stream<Item = i32>` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `dyn futures_core::stream::Stream<Item = i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn futures_core::stream::Stream<Item = i32>>`
= note: required because it appears within the type `std::boxed::Box<dyn futures_core::stream::Stream<Item = i32>>`
= note: required because it appears within the type `std::pin::Pin<std::boxed::Box<dyn futures_core::stream::Stream<Item = i32>>>`