rust/tests/ui/inference/issue-71732.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
829 B
Plaintext
Raw Normal View History

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
| |
| cannot infer type of the type parameter `Q` declared on the method `get`
2020-10-23 02:22:11 -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;
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
|
LL | .get::<Q>(&"key".into())
| +++++
2020-10-23 02:22:11 -05: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`.