]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/cross-return-site-inference.stderr
selection failure: recompute applicable impls
[rust.git] / src / test / ui / impl-trait / cross-return-site-inference.stderr
1 error[E0282]: type annotations needed
2   --> $DIR/cross-return-site-inference.rs:33:5
3    |
4 LL |     Ok(())
5    |     ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
6    |
7 help: consider specifying the generic arguments
8    |
9 LL |     Ok::<(), E>(())
10    |       +++++++++
11
12 error[E0282]: type annotations needed
13   --> $DIR/cross-return-site-inference.rs:38:12
14    |
15 LL |     return Err(From::from("foo"));
16    |            ^^^ cannot infer type of the type parameter `E` declared on the enum `Result`
17    |
18 help: consider specifying the generic arguments
19    |
20 LL |     return Err::<(), E>(From::from("foo"));
21    |               +++++++++
22
23 error[E0282]: type annotations needed
24   --> $DIR/cross-return-site-inference.rs:44:5
25    |
26 LL |     Err(From::from("foo"))
27    |     ^^^ cannot infer type of the type parameter `E` declared on the enum `Result`
28    |
29 help: consider specifying the generic arguments
30    |
31 LL |     Err::<(), E>(From::from("foo"))
32    |        +++++++++
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0282`.