blob: cce7d24a5f602d7d6ac9676094180cf00203c432 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
error[E0308]: mismatched types
--> $DIR/issue-27042.rs:6:16
|
LL | loop { break };
| ^^^^^ expected (), found i32
|
= note: expected type `()`
found type `i32`
error[E0308]: mismatched types
--> $DIR/issue-27042.rs:8:9
|
LL | / 'b:
LL | | while true { break }; // but here we cite the whole loop
| |____________________________^ expected i32, found ()
|
= note: expected type `i32`
found type `()`
error[E0308]: mismatched types
--> $DIR/issue-27042.rs:11:9
|
LL | / 'c:
LL | | for _ in None { break }; // but here we cite the whole loop
| |_______________________________^ expected i32, found ()
|
= note: expected type `i32`
found type `()`
error[E0308]: mismatched types
--> $DIR/issue-27042.rs:14:9
|
LL | / 'd:
LL | | while let Some(_) = None { break };
| |__________________________________________^ expected i32, found ()
|
= note: expected type `i32`
found type `()`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0308`.
|