summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-82361.fixed
blob: d72de982bf98ad4589e3885fd15c574075ab70ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// run-rustfix

fn main() {
    let a: usize = 123;
    let b: &usize = &a;

    if true {
        a
    } else {
        *b //~ ERROR `if` and `else` have incompatible types [E0308]
    };

    if true {
        1
    } else {
        1 //~ ERROR `if` and `else` have incompatible types [E0308]
    };

    if true {
        1
    } else {
        1 //~ ERROR `if` and `else` have incompatible types [E0308]
    };
}