1 warning: denote infinite loops with `loop { ... }`
2 --> $DIR/loop-break-value.rs:26:5
4 LL | 'while_loop: while true {
5 | ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop`
7 = note: `#[warn(while_true)]` on by default
9 error[E0571]: `break` with value from a `while` loop
10 --> $DIR/loop-break-value.rs:28:9
13 | ^^^^^^^^ can only break with a value inside `loop` or breakable block
15 help: instead, use `break` on its own without a value inside this `while` loop
20 error[E0571]: `break` with value from a `while` loop
21 --> $DIR/loop-break-value.rs:30:13
23 LL | break 'while_loop 123;
24 | ^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block
26 help: instead, use `break` on its own without a value inside this `while` loop
31 error[E0571]: `break` with value from a `while let` loop
32 --> $DIR/loop-break-value.rs:38:12
35 | ^^^^^^^^ can only break with a value inside `loop` or breakable block
37 help: instead, use `break` on its own without a value inside this `while let` loop
42 error[E0571]: `break` with value from a `while let` loop
43 --> $DIR/loop-break-value.rs:43:9
46 | ^^^^^^^^^^ can only break with a value inside `loop` or breakable block
48 help: instead, use `break` on its own without a value inside this `while let` loop
53 error[E0571]: `break` with value from a `while let` loop
54 --> $DIR/loop-break-value.rs:49:13
56 LL | break 'while_let_loop "nope";
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block
59 help: instead, use `break` on its own without a value inside this `while let` loop
64 error[E0571]: `break` with value from a `for` loop
65 --> $DIR/loop-break-value.rs:56:9
68 | ^^^^^^^^ can only break with a value inside `loop` or breakable block
70 help: instead, use `break` on its own without a value inside this `for` loop
75 error[E0571]: `break` with value from a `for` loop
76 --> $DIR/loop-break-value.rs:57:9
79 | ^^^^^^^^^^ can only break with a value inside `loop` or breakable block
81 help: instead, use `break` on its own without a value inside this `for` loop
86 error[E0571]: `break` with value from a `for` loop
87 --> $DIR/loop-break-value.rs:64:13
89 LL | break 'for_loop Some(17);
90 | ^^^^^^^^^^^^^^^^^^^^^^^^ can only break with a value inside `loop` or breakable block
92 help: instead, use `break` on its own without a value inside this `for` loop
97 error[E0308]: mismatched types
98 --> $DIR/loop-break-value.rs:4:31
100 LL | let val: ! = loop { break break; };
101 | ^^^^^ expected !, found ()
103 = note: expected type `!`
106 error[E0308]: mismatched types
107 --> $DIR/loop-break-value.rs:11:19
110 | ^^^ expected &str, found integer
112 error[E0308]: mismatched types
113 --> $DIR/loop-break-value.rs:16:15
116 | ^^^^^^ expected i32, found &str
118 error[E0308]: mismatched types
119 --> $DIR/loop-break-value.rs:21:31
121 LL | break 'outer_loop "nope";
122 | ^^^^^^ expected i32, found &str
124 error[E0308]: mismatched types
125 --> $DIR/loop-break-value.rs:73:26
128 | ^^^ expected (), found integer
130 error[E0308]: mismatched types
131 --> $DIR/loop-break-value.rs:80:15
133 LL | break (break, break);
134 | ^^^^^^^^^^^^^^ expected (), found tuple
136 = note: expected unit type `()`
139 error[E0308]: mismatched types
140 --> $DIR/loop-break-value.rs:85:15
143 | ^ expected (), found integer
145 error[E0308]: mismatched types
146 --> $DIR/loop-break-value.rs:90:9
151 | expected integer, found ()
152 | help: give it a value of the expected type: `break value`
154 error: aborting due to 16 previous errors
156 Some errors have detailed explanations: E0308, E0571.
157 For more information about an error, try `rustc --explain E0308`.