@@ -11,17 +11,41 @@ error[E0308]: mismatched types
11
11
found type `{integer}`
12
12
13
13
error[E0698]: type inside generator must be known in this context
14
- --> $DIR/bad-item-type.rs:5:1
14
+ --> $DIR/bad-item-type.rs:7:9
15
15
|
16
- 5 | #[async_stream(item = Option<i32>)]
17
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ cannot infer type for `{integer}`
16
+ 7 | let val = Some(42);
17
+ | ^^^ cannot infer type for `{integer}`
18
18
|
19
19
note: the type is part of the generator because of this `yield`
20
20
--> $DIR/bad-item-type.rs:5:1
21
21
|
22
22
5 | #[async_stream(item = Option<i32>)]
23
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
24
25
+ error[E0698]: type inside generator must be known in this context
26
+ --> $DIR/bad-item-type.rs:12:9
27
+ |
28
+ 12 | let val = val.unwrap();
29
+ | ^^^ cannot infer type for `{integer}`
30
+ |
31
+ note: the type is part of the generator because of this `yield`
32
+ --> $DIR/bad-item-type.rs:5:1
33
+ |
34
+ 5 | #[async_stream(item = Option<i32>)]
35
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
+
37
+ error[E0698]: type inside generator must be known in this context
38
+ --> $DIR/bad-item-type.rs:13:11
39
+ |
40
+ 13 | yield val;
41
+ | ^^^ cannot infer type for `{integer}`
42
+ |
43
+ note: the type is part of the generator because of this `yield`
44
+ --> $DIR/bad-item-type.rs:5:1
45
+ |
46
+ 5 | #[async_stream(item = Option<i32>)]
47
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
+
25
49
error[E0308]: mismatched types
26
50
--> $DIR/bad-item-type.rs:21:11
27
51
|
@@ -53,7 +77,55 @@ note: the type is part of the generator because of this `yield`
53
77
16 | #[async_stream(item = (i32, i32))]
54
78
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
79
56
- error: aborting due to 5 previous errors
80
+ error[E0698]: type inside generator must be known in this context
81
+ --> $DIR/bad-item-type.rs:19:15
82
+ |
83
+ 19 | yield 3;
84
+ | ^ cannot infer type for `{integer}`
85
+ |
86
+ note: the type is part of the generator because of this `yield`
87
+ --> $DIR/bad-item-type.rs:16:1
88
+ |
89
+ 16 | #[async_stream(item = (i32, i32))]
90
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91
+
92
+ error[E0698]: type inside generator must be known in this context
93
+ --> $DIR/bad-item-type.rs:21:12
94
+ |
95
+ 21 | yield (1, 2)
96
+ | ^ cannot infer type for `{integer}`
97
+ |
98
+ note: the type is part of the generator because of this `yield`
99
+ --> $DIR/bad-item-type.rs:16:1
100
+ |
101
+ 16 | #[async_stream(item = (i32, i32))]
102
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
+
104
+ error[E0698]: type inside generator must be known in this context
105
+ --> $DIR/bad-item-type.rs:21:15
106
+ |
107
+ 21 | yield (1, 2)
108
+ | ^ cannot infer type for `{integer}`
109
+ |
110
+ note: the type is part of the generator because of this `yield`
111
+ --> $DIR/bad-item-type.rs:16:1
112
+ |
113
+ 16 | #[async_stream(item = (i32, i32))]
114
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115
+
116
+ error[E0698]: type inside generator must be known in this context
117
+ --> $DIR/bad-item-type.rs:21:11
118
+ |
119
+ 21 | yield (1, 2)
120
+ | ^^^^^^ cannot infer type for `{integer}`
121
+ |
122
+ note: the type is part of the generator because of this `yield`
123
+ --> $DIR/bad-item-type.rs:16:1
124
+ |
125
+ 16 | #[async_stream(item = (i32, i32))]
126
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
+
128
+ error: aborting due to 11 previous errors
57
129
58
130
Some errors have detailed explanations: E0271, E0308, E0698.
59
131
For more information about an error, try `rustc --explain E0271`.
0 commit comments