From de11312138612e210e8eefac2fc7f887bf98e52c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jul 2019 18:25:58 +0900 Subject: [PATCH] Fix ui tests --- futures/testcrate/ui/bad-item-type.stderr | 80 +++++++++++++++++++++-- 1 file changed, 76 insertions(+), 4 deletions(-) diff --git a/futures/testcrate/ui/bad-item-type.stderr b/futures/testcrate/ui/bad-item-type.stderr index 3a13a5e627..3de92a4dc8 100644 --- a/futures/testcrate/ui/bad-item-type.stderr +++ b/futures/testcrate/ui/bad-item-type.stderr @@ -11,10 +11,10 @@ error[E0308]: mismatched types found type `{integer}` error[E0698]: type inside generator must be known in this context - --> $DIR/bad-item-type.rs:5:1 + --> $DIR/bad-item-type.rs:7:9 | -5 | #[async_stream(item = Option)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `{integer}` +7 | let val = Some(42); + | ^^^ cannot infer type for `{integer}` | note: the type is part of the generator because of this `yield` --> $DIR/bad-item-type.rs:5:1 @@ -22,6 +22,30 @@ note: the type is part of the generator because of this `yield` 5 | #[async_stream(item = Option)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error[E0698]: type inside generator must be known in this context + --> $DIR/bad-item-type.rs:12:9 + | +12 | 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:5:1 + | +5 | #[async_stream(item = Option)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0698]: type inside generator must be known in this context + --> $DIR/bad-item-type.rs:13:11 + | +13 | yield val; + | ^^^ cannot infer type for `{integer}` + | +note: the type is part of the generator because of this `yield` + --> $DIR/bad-item-type.rs:5:1 + | +5 | #[async_stream(item = Option)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error[E0308]: mismatched types --> $DIR/bad-item-type.rs:21:11 | @@ -53,7 +77,55 @@ note: the type is part of the generator because of this `yield` 16 | #[async_stream(item = (i32, i32))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 5 previous errors +error[E0698]: type inside generator must be known in this context + --> $DIR/bad-item-type.rs:19:15 + | +19 | yield 3; + | ^ cannot infer type for `{integer}` + | +note: the type is part of the generator because of this `yield` + --> $DIR/bad-item-type.rs:16:1 + | +16 | #[async_stream(item = (i32, i32))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0698]: type inside generator must be known in this context + --> $DIR/bad-item-type.rs:21:12 + | +21 | yield (1, 2) + | ^ cannot infer type for `{integer}` + | +note: the type is part of the generator because of this `yield` + --> $DIR/bad-item-type.rs:16:1 + | +16 | #[async_stream(item = (i32, i32))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0698]: type inside generator must be known in this context + --> $DIR/bad-item-type.rs:21:15 + | +21 | yield (1, 2) + | ^ cannot infer type for `{integer}` + | +note: the type is part of the generator because of this `yield` + --> $DIR/bad-item-type.rs:16:1 + | +16 | #[async_stream(item = (i32, i32))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0698]: type inside generator must be known in this context + --> $DIR/bad-item-type.rs:21:11 + | +21 | yield (1, 2) + | ^^^^^^ cannot infer type for `{integer}` + | +note: the type is part of the generator because of this `yield` + --> $DIR/bad-item-type.rs:16:1 + | +16 | #[async_stream(item = (i32, i32))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 11 previous errors Some errors have detailed explanations: E0271, E0308, E0698. For more information about an error, try `rustc --explain E0271`.