2020-10-23 02:22:11 -05:00
|
|
|
error[E0283]: type annotations needed
|
|
|
|
--> $DIR/issue-71732.rs:18:10
|
|
|
|
|
|
|
|
|
LL | .get(&"key".into())
|
2022-08-16 01:27:22 -05:00
|
|
|
| ^^^ ------------- type must be known at this point
|
|
|
|
| |
|
2023-02-21 15:11:08 -06:00
|
|
|
| cannot infer type of the type parameter `Q` declared on the method `get`
|
2020-10-23 02:22:11 -05:00
|
|
|
|
|
2021-10-01 08:05:17 -05: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 18:04:09 -05: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 01:27:22 -05:00
|
|
|
help: consider specifying the generic argument
|
2021-10-05 18:04:09 -05:00
|
|
|
|
|
|
|
|
LL | .get::<Q>(&"key".into())
|
|
|
|
| +++++
|
2020-10-23 02:22:11 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2020-10-23 02:22:11 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|