blob: 095c4032c3243c60a7bdd381e88451e0331351d9 [file]
error[E0308]: mismatched types
--> $DIR/break-while-condition.rs:8:13
|
LL | 'a: while break 'a {}
| ^^^^^^^^^^^^^^^^^^^^^ expected `!`, found `()`
|
= note: expected type `!`
found unit type `()`
= note: `while` loops evaluate to unit type `()`
help: consider adding a diverging expression here
|
LL | 'a: while break 'a {} /* `loop {}` or `panic!("...")` */
| ++++++++++++++++++++++++++++++++++
error[E0308]: mismatched types
--> $DIR/break-while-condition.rs:15:13
|
LL | / while false {
LL | |
LL | | break;
LL | | }
| |_____________^ expected `!`, found `()`
|
= note: expected type `!`
found unit type `()`
= note: `while` loops evaluate to unit type `()`
help: consider adding a diverging expression here
|
LL ~ }
LL + /* `loop {}` or `panic!("...")` */
|
error[E0308]: mismatched types
--> $DIR/break-while-condition.rs:24:13
|
LL | / while false {
LL | |
LL | | return;
LL | | }
| |_____________^ expected `!`, found `()`
|
= note: expected type `!`
found unit type `()`
= note: `while` loops evaluate to unit type `()`
help: consider adding a diverging expression here
|
LL ~ }
LL + /* `loop {}` or `panic!("...")` */
|
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0308`.