]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coercion-missing-tail-expected-type.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / coercion / coercion-missing-tail-expected-type.rs
1 // #41425 -- error message "mismatched types" has wrong types
2
3 fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types
4     x + 1;
5 }
6
7 fn foo() -> Result<u8, u64> { //~ ERROR mismatched types
8     Ok(1);
9 }
10
11 fn main() {
12     let x = plus_one(5);
13     println!("X = {}", x);
14 }