]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
ed4f34b527fcbe3f61013c6a518d0a04cdb0bb01
[rust.git] / src / test / ui / rfc-1937-termination-trait / termination-trait-test-wrong-type.stderr
1 error[E0277]: `main` has invalid return type `std::result::Result<f32, std::num::ParseFloatError>`
2   --> $DIR/termination-trait-test-wrong-type.rs:10:1
3    |
4 LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
5 LL | |     "0".parse()
6 LL | | }
7    | |_^ `main` can only return types that implement `std::process::Termination`
8    | 
9   ::: $SRC_DIR/libtest/lib.rs:LL:COL
10    |
11 LL |   pub fn assert_test_result<T: Termination>(result: T) {
12    |                                ----------- required by this bound in `test::assert_test_result`
13    |
14    = help: the trait `std::process::Termination` is not implemented for `std::result::Result<f32, std::num::ParseFloatError>`
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0277`.