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