]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion-missing-tail-expected-type.stderr
report the total number of errors on compilation failure
[rust.git] / src / test / ui / coercion-missing-tail-expected-type.stderr
1 error[E0308]: mismatched types
2   --> $DIR/coercion-missing-tail-expected-type.rs:13:28
3    |
4 13 |   fn plus_one(x: i32) -> i32 {
5    |  ____________________________^
6 14 | |     x + 1;
7    | |          - help: consider removing this semicolon
8 15 | | }
9    | |_^ expected i32, found ()
10    |
11    = note: expected type `i32`
12               found type `()`
13
14 error[E0308]: mismatched types
15   --> $DIR/coercion-missing-tail-expected-type.rs:17:29
16    |
17 17 |   fn foo() -> Result<u8, u64> {
18    |  _____________________________^
19 18 | |     Ok(1);
20    | |          - help: consider removing this semicolon
21 19 | | }
22    | |_^ expected enum `std::result::Result`, found ()
23    |
24    = note: expected type `std::result::Result<u8, u64>`
25               found type `()`
26
27 error: aborting due to 2 previous errors
28