blob: 1c47aafec6b97f8772a6d84873fafe8643326cd5 [file] [log] [blame]
error[E0277]: `main` has invalid return type `std::result::Result<f32, std::num::ParseFloatError>`
--> $DIR/termination-trait-test-wrong-type.rs:6:1
|
LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
LL | | "0".parse()
LL | | }
| |_^ `main` can only return types that implement `std::process::Termination`
|
::: $SRC_DIR/libtest/lib.rs:LL:COL
|
LL | pub fn assert_test_result<T: Termination>(result: T) {
| ----------- required by this bound in `test::assert_test_result`
|
= help: the trait `std::process::Termination` is not implemented for `std::result::Result<f32, std::num::ParseFloatError>`
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.