2019-06-21 18:30:24 -05:00
|
|
|
warning: denote infinite loops with `loop { ... }`
|
|
|
|
--> $DIR/block-must-not-have-result-while.rs:2:5
|
|
|
|
|
|
|
|
|
LL | while true {
|
|
|
|
| ^^^^^^^^^^ help: use `loop`
|
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[warn(while_true)]` on by default
|
2019-06-21 18:30:24 -05:00
|
|
|
|
2017-06-23 19:43:35 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/block-must-not-have-result-while.rs:3:9
|
2017-06-23 19:43:35 -05:00
|
|
|
|
|
2020-04-23 17:22:50 -05:00
|
|
|
LL | / while true {
|
|
|
|
LL | | true
|
|
|
|
| | ^^^^ expected `()`, found `bool`
|
|
|
|
LL | |
|
|
|
|
LL | | }
|
2021-02-04 19:36:06 -06:00
|
|
|
| |_____- expected this to be `()`
|
2017-06-23 19:43:35 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
2017-06-23 19:43:35 -05:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|