]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
Rollup merge of #100861 - RalfJung:const-ice, r=oli-obk
[rust.git] / src / test / ui / rfc-1937-termination-trait / termination-trait-test-wrong-type.stderr
1 error[E0277]: `main` has invalid return type `f32`
2   --> $DIR/termination-trait-test-wrong-type.rs:6:1
3    |
4 LL |   #[test]
5    |   ------- in this procedural macro expansion
6 LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
7 LL | |     "0".parse()
8 LL | | }
9    | |_^ `main` can only return types that implement `Termination`
10    |
11    = help: the trait `Termination` is not implemented for `f32`
12    = note: required for `Result<f32, ParseFloatError>` to implement `Termination`
13 note: required by a bound in `assert_test_result`
14   --> $SRC_DIR/test/src/lib.rs:LL:COL
15    |
16 LL | pub fn assert_test_result<T: Termination>(result: T) {
17    |                              ^^^^^^^^^^^ required by this bound in `assert_test_result`
18    = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.