1 error[E0268]: `break` outside of a loop
2 --> $DIR/issue-43162.rs:3:5
5 | ^^^^^^^^^^ cannot `break` outside of a loop
7 error[E0268]: `break` outside of a loop
8 --> $DIR/issue-43162.rs:7:5
11 | ^^^^^^^^ cannot `break` outside of a loop
13 error[E0308]: mismatched types
14 --> $DIR/issue-43162.rs:1:13
16 LL | fn foo() -> bool {
17 | --- ^^^^ expected bool, found ()
19 | implicitly returns `()` as its body has no tail or `return` expression
22 | - help: consider removing this semicolon
24 = note: expected type `bool`
27 error: aborting due to 3 previous errors
29 Some errors have detailed explanations: E0268, E0308.
30 For more information about an error, try `rustc --explain E0268`.