fork/rust

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

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

master
418 B24 linesraw
1// run-rustfix
2
3fn main() {
4    let a: usize = 123;
5    let b: &usize = &a;
6
7    if true {
8        a
9    } else {
10        *b //~ ERROR `if` and `else` have incompatible types [E0308]
11    };
12
13    if true {
14        1
15    } else {
16        1 //~ ERROR `if` and `else` have incompatible types [E0308]
17    };
18
19    if true {
20        1
21    } else {
22        1 //~ ERROR `if` and `else` have incompatible types [E0308]
23    };
24}