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