]> git.lizzy.rs Git - rust.git/blob - src/test/ui/inference/erase-type-params-in-label.stderr
Rollup merge of #99064 - lyming2007:issue-97687-fix, r=estebank
[rust.git] / src / test / ui / inference / erase-type-params-in-label.stderr
1 error[E0283]: type annotations needed for `Foo<i32, &str, W, Z>`
2   --> $DIR/erase-type-params-in-label.rs:2:9
3    |
4 LL |     let foo = foo(1, "");
5    |         ^^^   --- type must be known at this point
6    |
7    = note: cannot satisfy `_: Default`
8 note: required by a bound in `foo`
9   --> $DIR/erase-type-params-in-label.rs:25:17
10    |
11 LL | fn foo<T, K, W: Default, Z: Default>(t: T, k: K) -> Foo<T, K, W, Z> {
12    |                 ^^^^^^^ required by this bound in `foo`
13 help: consider specifying the type arguments in the function call
14    |
15 LL |     let foo = foo::<T, K, W, Z>(1, "");
16    |                  ++++++++++++++
17
18 error[E0283]: type annotations needed for `Bar<i32, &str, Z>`
19   --> $DIR/erase-type-params-in-label.rs:5:9
20    |
21 LL |     let bar = bar(1, "");
22    |         ^^^   --- type must be known at this point
23    |
24    = note: cannot satisfy `_: Default`
25 note: required by a bound in `bar`
26   --> $DIR/erase-type-params-in-label.rs:14:17
27    |
28 LL | fn bar<T, K, Z: Default>(t: T, k: K) -> Bar<T, K, Z> {
29    |                 ^^^^^^^ required by this bound in `bar`
30 help: consider specifying the type arguments in the function call
31    |
32 LL |     let bar = bar::<T, K, Z>(1, "");
33    |                  +++++++++++
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0283`.