]> git.proxmox.com Git - rustc.git/blob - src/test/ui/return/tail-expr-as-potential-return.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / return / tail-expr-as-potential-return.stderr
1 error[E0308]: mismatched types
2 --> $DIR/tail-expr-as-potential-return.rs:7:9
3 |
4 LL | / if x {
5 LL | | Err(42)
6 | | ^^^^^^^ expected `()`, found enum `Result`
7 LL | | }
8 | |_____- expected this to be `()`
9 |
10 = note: expected unit type `()`
11 found enum `Result<_, {integer}>`
12 help: you might have meant to return this value
13 |
14 LL | return Err(42);
15 | ++++++ +
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.