1 error[E0308]: `if` and `else` have incompatible types
2 --> $DIR/issue-101065.rs:12:9
4 LL | let _x = if true {
6 LL | | FakeResult::Ok(FakeResult::Ok(()))
7 | | ---------------------------------- expected because of this
9 LL | | FakeResult::Ok(())
10 | | ^^^^^^^^^^^^^^^^^^ expected enum `FakeResult`, found `()`
12 | |_____- `if` and `else` have incompatible types
14 = note: expected enum `FakeResult<FakeResult<()>>`
15 found enum `FakeResult<()>`
16 help: try wrapping the expression in `FakeResult::Ok`
18 LL | FakeResult::Ok(FakeResult::Ok(()))
21 error: aborting due to previous error
23 For more information about this error, try `rustc --explain E0308`.