2022-04-28 08:25:36 -05:00
|
|
|
error[E0282]: type annotations needed
|
2022-02-14 06:25:26 -06:00
|
|
|
--> $DIR/cross-return-site-inference.rs:33:5
|
2022-02-16 09:48:46 -06:00
|
|
|
|
|
2022-02-14 06:25:26 -06:00
|
|
|
LL | Ok(())
|
|
|
|
| ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
|
|
|
|
|
|
|
|
|
help: consider specifying the generic arguments
|
|
|
|
|
|
|
|
|
LL | Ok::<(), E>(())
|
|
|
|
| +++++++++
|
2022-02-16 09:48:46 -06:00
|
|
|
|
2023-08-14 08:09:53 -05:00
|
|
|
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
|
|
|
|
--> $DIR/cross-return-site-inference.rs:38:16
|
2022-02-14 06:25:26 -06:00
|
|
|
|
|
|
|
|
LL | return Err(From::from("foo"));
|
2024-01-23 20:52:29 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
|
2023-08-14 08:26:11 -05:00
|
|
|
|
|
|
|
|
help: use a fully-qualified path to a specific available implementation
|
|
|
|
|
|
|
|
|
LL | return Err(</* self type */ as From>::from("foo"));
|
|
|
|
| +++++++++++++++++++ +
|
2022-02-16 09:48:46 -06:00
|
|
|
|
2023-08-14 08:09:53 -05:00
|
|
|
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
|
|
|
|
--> $DIR/cross-return-site-inference.rs:44:9
|
2022-02-14 06:25:26 -06:00
|
|
|
|
|
|
|
|
LL | Err(From::from("foo"))
|
2024-01-23 20:52:29 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
|
2023-08-14 08:26:11 -05:00
|
|
|
|
|
|
|
|
help: use a fully-qualified path to a specific available implementation
|
|
|
|
|
|
|
|
|
LL | Err(</* self type */ as From>::from("foo"))
|
|
|
|
| +++++++++++++++++++ +
|
2022-02-16 09:48:46 -06:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2023-08-14 08:09:53 -05:00
|
|
|
Some errors have detailed explanations: E0282, E0790.
|
|
|
|
For more information about an error, try `rustc --explain E0282`.
|