]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/match-needing-semi.stderr
Rollup merge of #106919 - compiler-errors:underscore-typo-in-field-pat, r=jackh726
[rust.git] / tests / ui / suggestions / match-needing-semi.stderr
1 error[E0308]: mismatched types
2   --> $DIR/match-needing-semi.rs:7:13
3    |
4 LL | /     match 3 {
5 LL | |         4 => 1,
6 LL | |         3 => {
7 LL | |             foo()
8    | |             ^^^^^ expected `()`, found `i32`
9 LL | |         }
10 LL | |         _ => 2
11 LL | |     }
12    | |_____- expected this to be `()`
13    |
14 help: consider using a semicolon here
15    |
16 LL |             foo();
17    |                  +
18 help: consider using a semicolon here
19    |
20 LL |     };
21    |      +
22
23 error[E0308]: mismatched types
24   --> $DIR/match-needing-semi.rs:11:5
25    |
26 LL | /     match 3 {
27 LL | |         4 => 1,
28 LL | |         3 => 2,
29 LL | |         _ => 2
30 LL | |     }
31    | |     ^- help: consider using a semicolon here
32    | |_____|
33    |       expected `()`, found integer
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0308`.