]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/erase-type-params-in-label.stderr
Rollup merge of #106849 - WaffleLapkin:unvec, r=Nilstrieb
[rust.git] / tests / 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 giving `foo` an explicit type, where the type for type parameter `W` is specified
14    |
15 LL |     let foo: Foo<i32, &str, W, Z> = foo(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 giving `bar` an explicit type, where the type for type parameter `Z` is specified
31    |
32 LL |     let bar: Bar<i32, &str, Z> = bar(1, "");
33    |            +++++++++++++++++++
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0283`.