1 error[E0268]: `break` outside of loop
2 --> $DIR/issue-43162.rs:13:5
4 LL | break true; //~ ERROR E0268
5 | ^^^^^^^^^^ cannot break outside of a loop
7 error[E0268]: `break` outside of loop
8 --> $DIR/issue-43162.rs:17:5
10 LL | break {}; //~ ERROR E0268
11 | ^^^^^^^^ cannot break outside of a loop
13 error[E0308]: mismatched types
14 --> $DIR/issue-43162.rs:11:18
16 LL | fn foo() -> bool {
18 LL | | //~^ ERROR E0308
19 LL | | break true; //~ ERROR E0268
20 | | - help: consider removing this semicolon
22 | |_^ expected bool, found ()
24 = note: expected type `bool`
27 error: aborting due to 3 previous errors
29 Some errors occurred: E0268, E0308.
30 For more information about an error, try `rustc --explain E0268`.