1 warning: denote infinite loops with `loop { ... }`
2 --> $DIR/issue-27042.rs:8:9
6 LL | | while true { break }; // but here we cite the whole loop
7 | |____________________________^ help: use `loop`
9 = note: `#[warn(while_true)]` on by default
11 error[E0308]: mismatched types
12 --> $DIR/issue-27042.rs:6:16
17 | expected i32, found ()
18 | help: give it a value of the expected type: `break 42`
20 = note: expected type `i32`
23 error[E0308]: mismatched types
24 --> $DIR/issue-27042.rs:8:9
28 LL | | while true { break }; // but here we cite the whole loop
29 | |____________________________^ expected i32, found ()
31 = note: expected type `i32`
34 error[E0308]: mismatched types
35 --> $DIR/issue-27042.rs:12:9
38 LL | | for _ in None { break }; // but here we cite the whole loop
39 | |_______________________________^ expected i32, found ()
41 = note: expected type `i32`
44 error[E0308]: mismatched types
45 --> $DIR/issue-27042.rs:15:9
48 LL | | while let Some(_) = None { break };
49 | |__________________________________________^ expected i32, found ()
51 = note: expected type `i32`
54 error: aborting due to 4 previous errors
56 For more information about this error, try `rustc --explain E0308`.