error[E0308]: mismatched types --> tests/ui/bad-item-type.rs:15:11 | 7 | #[stream(item = Option)] | ----------------------------- arguments to this enum variant are incorrect ... 15 | yield val; //~ ERROR mismatched types | ^^^ expected `Option<_>`, found integer | = note: expected enum `Option<_>` found type `{integer}` help: the type constructed contains `{integer}` due to the type of the argument passed --> tests/ui/bad-item-type.rs:7:1 | 7 | #[stream(item = Option)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 15 | yield val; //~ ERROR mismatched types | --- this argument influences the type of `{{root}}` note: tuple variant defined here --> $RUST/core/src/task/poll.rs | | Ready(#[stable(feature = "futures_api", since = "1.36.0")] T), | ^^^^^ = note: this error originates in the attribute macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info) help: try wrapping the expression in `Some` | 15 | yield Some(val); //~ ERROR mismatched types | +++++ + error[E0308]: mismatched types --> tests/ui/bad-item-type.rs:34:11 | 29 | #[stream(item = (i32, i32))] | ---------------------------- arguments to this enum variant are incorrect ... 34 | yield (1, 2) //~ ERROR mismatched types | ^^^^^^ expected integer, found `({integer}, {integer})` | = note: expected type `{integer}` found tuple `({integer}, {integer})` help: the type constructed contains `({integer}, {integer})` due to the type of the argument passed --> tests/ui/bad-item-type.rs:29:1 | 29 | #[stream(item = (i32, i32))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 34 | yield (1, 2) //~ ERROR mismatched types | ------ this argument influences the type of `{{root}}` note: tuple variant defined here --> $RUST/core/src/task/poll.rs | | Ready(#[stable(feature = "futures_api", since = "1.36.0")] T), | ^^^^^ = note: this error originates in the attribute macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving ` as Stream>::Item == (i32, i32)` --> tests/ui/bad-item-type.rs:29:1 | 29 | #[stream(item = (i32, i32))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected integer, found `(i32, i32)` | = note: expected type `{integer}` found tuple `(i32, i32)` error[E0308]: mismatched types --> tests/ui/bad-item-type.rs:26:11 | 18 | #[stream(item = Option, boxed)] | ------------------------------------ arguments to this enum variant are incorrect ... 26 | yield val; //~ ERROR mismatched types | ^^^ expected `Option<_>`, found integer | = note: expected enum `Option<_>` found type `{integer}` help: the type constructed contains `{integer}` due to the type of the argument passed --> tests/ui/bad-item-type.rs:18:1 | 18 | #[stream(item = Option, boxed)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 26 | yield val; //~ ERROR mismatched types | --- this argument influences the type of `{{root}}` note: tuple variant defined here --> $RUST/core/src/task/poll.rs | | Ready(#[stable(feature = "futures_api", since = "1.36.0")] T), | ^^^^^ = note: this error originates in the attribute macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info) help: try wrapping the expression in `Some` | 26 | yield Some(val); //~ ERROR mismatched types | +++++ + error[E0308]: mismatched types --> tests/ui/bad-item-type.rs:42:11 | 37 | #[stream(item = (i32, i32), boxed)] | ----------------------------------- arguments to this enum variant are incorrect ... 42 | yield (1, 2) //~ ERROR mismatched types | ^^^^^^ expected integer, found `({integer}, {integer})` | = note: expected type `{integer}` found tuple `({integer}, {integer})` help: the type constructed contains `({integer}, {integer})` due to the type of the argument passed --> tests/ui/bad-item-type.rs:37:1 | 37 | #[stream(item = (i32, i32), boxed)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 42 | yield (1, 2) //~ ERROR mismatched types | ------ this argument influences the type of `{{root}}` note: tuple variant defined here --> $RUST/core/src/task/poll.rs | | Ready(#[stable(feature = "futures_api", since = "1.36.0")] T), | ^^^^^ = note: this error originates in the attribute macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving ` as Stream>::Item == (i32, i32)` --> tests/ui/bad-item-type.rs:37:1 | 37 | #[stream(item = (i32, i32), boxed)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(i32, i32)`, found integer | = note: expected tuple `(i32, i32)` found type `{integer}` = note: required for the cast from `Pin>>` to `Pin + Send + 'static)>>` = note: this error originates in the attribute macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info)