]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-101065.stderr
Rollup merge of #107255 - lcnr:implied-b-hr, r=oli-obk
[rust.git] / tests / ui / suggestions / issue-101065.stderr
1 error[E0308]: `if` and `else` have incompatible types
2   --> $DIR/issue-101065.rs:12:9
3    |
4 LL |       let _x = if true {
5    |  ______________-
6 LL | |         FakeResult::Ok(FakeResult::Ok(()))
7    | |         ---------------------------------- expected because of this
8 LL | |     } else {
9 LL | |         FakeResult::Ok(())
10    | |         ^^^^^^^^^^^^^^^^^^ expected enum `FakeResult`, found `()`
11 LL | |     };
12    | |_____- `if` and `else` have incompatible types
13    |
14    = note: expected enum `FakeResult<FakeResult<()>>`
15               found enum `FakeResult<()>`
16 help: try wrapping the expression in `FakeResult::Ok`
17    |
18 LL |         FakeResult::Ok(FakeResult::Ok(()))
19    |         +++++++++++++++                  +
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0308`.