]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/ambiguous_type_parameter.rs
Rollup merge of #107348 - lcnr:project-solve-new, r=compiler-errors
[rust.git] / tests / ui / inference / ambiguous_type_parameter.rs
1 use std::collections::HashMap;
2
3 trait Store<K, V> {
4     fn get_raw(&self, key: &K) -> Option<()>;
5 }
6
7 struct InMemoryStore;
8
9 impl<K> Store<String, HashMap<K, String>> for InMemoryStore {
10     fn get_raw(&self, key: &String) -> Option<()> {
11         None
12     }
13 }
14
15 fn main() {
16     InMemoryStore.get_raw(&String::default()); //~ ERROR type annotations needed
17 }