]> git.lizzy.rs Git - rust.git/blob - src/test/ui/inference/issue-71732.stderr
Rollup merge of #100713 - Xiretza:parser-expr-session-diagnostics, r=estebank
[rust.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    |          ^^^ ------------- type must be known at this point
6    |          |
7    |          cannot infer type of the 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 generic argument
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`.