]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type/type-annotation-needed.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / type / type-annotation-needed.stderr
1 error[E0283]: type annotations needed
2 --> $DIR/type-annotation-needed.rs:6:5
3 |
4 LL | foo(42);
5 | ^^^ cannot infer type of the type parameter `T` declared on the function `foo`
6 |
7 = note: cannot satisfy `_: Into<String>`
8 note: required by a bound in `foo`
9 --> $DIR/type-annotation-needed.rs:1:11
10 |
11 LL | fn foo<T: Into<String>>(x: i32) {}
12 | ^^^^^^^^^^^^ required by this bound in `foo`
13 help: consider specifying the generic argument
14 |
15 LL | foo::<T>(42);
16 | +++++
17 help: consider specifying the type argument in the function call
18 |
19 LL | foo::<T>(42);
20 | +++++
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0283`.