]> git.proxmox.com Git - rustc.git/blob - src/test/ui/inference/issue-71732.stderr
New upstream version 1.58.1+dfsg1
[rustc.git] / src / test / ui / inference / issue-71732.stderr
1 error[E0283]: type annotations needed
2 --> $DIR/issue-71732.rs:18:10
3 |
4 LL | .get(&"key".into())
5 | ^^^ ------------ this method call resolves to `T`
6 | |
7 | cannot infer type for type parameter `Q` declared on the associated function `get`
8 |
9 = note: multiple `impl`s satisfying `String: Borrow<_>` found in the following crates: `alloc`, `core`:
10 - impl Borrow<str> for String;
11 - impl<T> Borrow<T> for T
12 where T: ?Sized;
13 note: required by a bound in `HashMap::<K, V, S>::get`
14 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
15 |
16 LL | K: Borrow<Q>,
17 | ^^^^^^^^^ required by this bound in `HashMap::<K, V, S>::get`
18 help: consider specifying the type argument in the function call
19 |
20 LL | .get::<Q>(&"key".into())
21 | +++++
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0283`.