fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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