fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/loop-labeled-break-value.rs:3:29 3 | 4LL | let _: i32 = loop { break }; 5 | - ---- ^^^^^ expected `i32`, found `()` 6 | | | 7 | | this loop is expected to be of type `i32` 8 | expected because of this assignment 9 | 10help: give it a value of the expected type 11 | 12LL | let _: i32 = loop { break 42 }; 13 | ++ 14 15error[E0308]: mismatched types 16 --> $DIR/loop-labeled-break-value.rs:6:37 17 | 18LL | let _: i32 = 'inner: loop { break 'inner }; 19 | - ---- ^^^^^^^^^^^^ expected `i32`, found `()` 20 | | | 21 | | this loop is expected to be of type `i32` 22 | expected because of this assignment 23 | 24help: give it a value of the expected type 25 | 26LL | let _: i32 = 'inner: loop { break 'inner 42 }; 27 | ++ 28 29error[E0308]: mismatched types 30 --> $DIR/loop-labeled-break-value.rs:9:45 31 | 32LL | let _: i32 = 'inner2: loop { loop { break 'inner2 } }; 33 | - ---- ^^^^^^^^^^^^^ expected `i32`, found `()` 34 | | | 35 | | this loop is expected to be of type `i32` 36 | expected because of this assignment 37 | 38help: give it a value of the expected type 39 | 40LL | let _: i32 = 'inner2: loop { loop { break 'inner2 42 } }; 41 | ++ 42 43error: aborting due to 3 previous errors 44 45For more information about this error, try `rustc --explain E0308`.