2020-10-23 07:22:11 +00:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-71732.rs:18:10
|
|
|
|
|
|
|
|
|
LL | .get(&"key".into())
|
2022-08-16 06:27:22 +00:00
|
|
|
| ^^^ ------------- type must be known at this point
|
|
|
|
| |
|
2023-02-21 21:11:08 +00:00
|
|
|
| cannot infer type of the type parameter `Q` declared on the method `get`
|
2020-10-23 07:22:11 +00:00
|
|
|
|
|
2021-10-01 13:05:17 +00:00
|
|
|
= note: multiple `impl`s satisfying `String: Borrow<_>` found in the following crates: `alloc`, `core`:
|
|
|
|
- impl Borrow<str> for String;
|
|
|
|
- impl<T> Borrow<T> for T
|
|
|
|
where T: ?Sized;
|
2021-10-05 23:04:09 +00:00
|
|
|
note: required by a bound in `HashMap::<K, V, S>::get`
|
|
|
|
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
|
2022-08-16 06:27:22 +00:00
|
|
|
help: consider specifying the generic argument
|
2021-10-05 23:04:09 +00:00
|
|
|
|
|
|
|
|
LL | .get::<Q>(&"key".into())
|
|
|
|
| +++++
|
2020-10-23 07:22:11 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2020-10-23 07:22:11 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|