]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/issue-71732.stderr
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / 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 help: consider specifying the generic argument
16    |
17 LL |         .get::<Q>(&"key".into())
18    |             +++++
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0283`.