summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/coercion-missing-tail-expected-type.fixed
blob: 713e04774a0e70a6356f8e20835afc29e6c47170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// #41425 -- error message "mismatched types" has wrong types
// run-rustfix

fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types
    x + 1
}

fn foo() -> Result<u8, u64> { //~ ERROR mismatched types
    Ok(1)
}

fn main() {
    let x = plus_one(5);
    let _ = foo();
    println!("X = {}", x);
}