summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-101065.stderr
blob: 9f77ead42944fac02ea7445b5c2215a9a691f743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error[E0308]: `if` and `else` have incompatible types
  --> $DIR/issue-101065.rs:12:9
   |
LL |       let _x = if true {
   |  ______________-
LL | |         FakeResult::Ok(FakeResult::Ok(()))
   | |         ---------------------------------- expected because of this
LL | |     } else {
LL | |         FakeResult::Ok(())
   | |         ^^^^^^^^^^^^^^^^^^ expected `FakeResult<FakeResult<()>>`, found `FakeResult<()>`
LL | |     };
   | |_____- `if` and `else` have incompatible types
   |
   = note: expected enum `FakeResult<FakeResult<()>>`
              found enum `FakeResult<()>`
help: try wrapping the expression in `FakeResult::Ok`
   |
LL |         FakeResult::Ok(FakeResult::Ok(()))
   |         +++++++++++++++                  +

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.