]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | error[E0277]: `main` has invalid return type `Result<f32, ParseFloatError>` |
ba9703b0 | 2 | --> $DIR/termination-trait-test-wrong-type.rs:6:1 |
83c7162d | 3 | | |
136023e0 XL |
4 | LL | #[test] |
5 | | ------- in this procedural macro expansion | |
48663c56 | 6 | LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> { |
83c7162d XL |
7 | LL | | "0".parse() |
8 | LL | | } | |
1b1a35ee | 9 | | |_^ `main` can only return types that implement `Termination` |
e1599b0c | 10 | | |
3dfed10e | 11 | ::: $SRC_DIR/test/src/lib.rs:LL:COL |
e1599b0c XL |
12 | | |
13 | LL | pub fn assert_test_result<T: Termination>(result: T) { | |
1b1a35ee | 14 | | ----------- required by this bound in `assert_test_result` |
83c7162d | 15 | | |
6a06907d | 16 | = help: the trait `Termination` is not implemented for `Result<f32, ParseFloatError>` |
17df50a5 | 17 | = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) |
83c7162d XL |
18 | |
19 | error: aborting due to previous error | |
20 | ||
21 | For more information about this error, try `rustc --explain E0277`. |