]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / rfc-1937-termination-trait / termination-trait-test-wrong-type.stderr
CommitLineData
6a06907d 1error[E0277]: `main` has invalid return type `Result<f32, ParseFloatError>`
ba9703b0 2 --> $DIR/termination-trait-test-wrong-type.rs:6:1
83c7162d 3 |
136023e0
XL
4LL | #[test]
5 | ------- in this procedural macro expansion
48663c56 6LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
83c7162d
XL
7LL | | "0".parse()
8LL | | }
1b1a35ee 9 | |_^ `main` can only return types that implement `Termination`
83c7162d 10 |
6a06907d 11 = help: the trait `Termination` is not implemented for `Result<f32, ParseFloatError>`
04454e1e
FG
12 = help: the following other types implement trait `Termination`:
13 Result<!, E>
14 Result<(), E>
15 Result<Infallible, E>
94222f64
XL
16note: required by a bound in `assert_test_result`
17 --> $SRC_DIR/test/src/lib.rs:LL:COL
18 |
19LL | pub fn assert_test_result<T: Termination>(result: T) {
20 | ^^^^^^^^^^^ required by this bound in `assert_test_result`
17df50a5 21 = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
83c7162d
XL
22
23error: aborting due to previous error
24
25For more information about this error, try `rustc --explain E0277`.