1 error[E0308]: mismatched types
2 --> $DIR/break-diverging-value.rs:11:26
4 LL | fn loop_break_break() -> i32 {
5 | ---------------- ^^^ expected `i32`, found `()`
7 | implicitly returns `()` as its body has no tail or `return` expression
9 error[E0069]: `return;` in a function whose return type is not `()`
10 --> $DIR/break-diverging-value.rs:16:37
12 LL | let loop_value = loop { break { return; () } };
13 | ^^^^^^ return type is not `()`
15 error[E0308]: mismatched types
16 --> $DIR/break-diverging-value.rs:15:29
18 LL | fn loop_break_return_2() -> i32 {
19 | ------------------- ^^^ expected `i32`, found `()`
21 | implicitly returns `()` as its body has no tail or `return` expression
23 error[E0308]: mismatched types
24 --> $DIR/break-diverging-value.rs:26:25
26 LL | fn loop_break_void() -> i32 {
27 | --------------- ^^^ expected `i32`, found `()`
29 | implicitly returns `()` as its body has no tail or `return` expression
31 error: aborting due to 4 previous errors
33 Some errors have detailed explanations: E0069, E0308.
34 For more information about an error, try `rustc --explain E0069`.