@@ -2,28 +2,37 @@ error[E0308]: mismatched types
22 --> $DIR/loop-labeled-break-value.rs:3:29
33 |
44LL | let _: i32 = loop { break };
5- | ^^^^^ expected (), found i32
5+ | ^^^^^
6+ | |
7+ | expected i32, found ()
8+ | help: give it a value of the expected type: `break 42`
69 |
7- = note: expected type `() `
8- found type `i32 `
10+ = note: expected type `i32 `
11+ found type `() `
912
1013error[E0308]: mismatched types
1114 --> $DIR/loop-labeled-break-value.rs:6:37
1215 |
1316LL | let _: i32 = 'inner: loop { break 'inner };
14- | ^^^^^^^^^^^^ expected (), found i32
17+ | ^^^^^^^^^^^^
18+ | |
19+ | expected i32, found ()
20+ | help: give it a value of the expected type: `break 'inner 42`
1521 |
16- = note: expected type `() `
17- found type `i32 `
22+ = note: expected type `i32 `
23+ found type `() `
1824
1925error[E0308]: mismatched types
2026 --> $DIR/loop-labeled-break-value.rs:9:45
2127 |
2228LL | let _: i32 = 'inner2: loop { loop { break 'inner2 } };
23- | ^^^^^^^^^^^^^ expected (), found i32
29+ | ^^^^^^^^^^^^^
30+ | |
31+ | expected i32, found ()
32+ | help: give it a value of the expected type: `break 'inner2 42`
2433 |
25- = note: expected type `() `
26- found type `i32 `
34+ = note: expected type `i32 `
35+ found type `() `
2736
2837error: aborting due to 3 previous errors
2938
0 commit comments