|
1 | | -error[E0277]: `main` has invalid return type `std::result::Result<f32, std::num::ParseIntError>` |
| 1 | +error[E0277]: `main` has invalid return type `std::result::Result<f32, std::num::ParseFloatError>` |
2 | 2 | --> $DIR/termination-trait-test-wrong-type.rs:6:1 |
3 | 3 | | |
4 | | -LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseIntError> { |
| 4 | +LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> { |
5 | 5 | LL | | "0".parse() |
6 | 6 | LL | | } |
7 | 7 | | |_^ `main` can only return types that implement `std::process::Termination` |
8 | 8 | | |
9 | | - = help: the trait `std::process::Termination` is not implemented for `std::result::Result<f32, std::num::ParseIntError>` |
| 9 | + = help: the trait `std::process::Termination` is not implemented for `std::result::Result<f32, std::num::ParseFloatError>` |
10 | 10 | = note: required by `test::assert_test_result` |
11 | 11 |
|
12 | | -error[E0271]: type mismatch resolving `<f32 as std::str::FromStr>::Err == std::num::ParseIntError` |
13 | | - --> $DIR/termination-trait-test-wrong-type.rs:7:9 |
14 | | - | |
15 | | -LL | "0".parse() |
16 | | - | ^^^^^ expected struct `std::num::ParseFloatError`, found struct `std::num::ParseIntError` |
17 | | - | |
18 | | - = note: expected type `std::num::ParseFloatError` |
19 | | - found type `std::num::ParseIntError` |
20 | | - |
21 | | -error: aborting due to 2 previous errors |
| 12 | +error: aborting due to previous error |
22 | 13 |
|
23 | | -Some errors have detailed explanations: E0271, E0277. |
24 | | -For more information about an error, try `rustc --explain E0271`. |
| 14 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments