summaryrefslogtreecommitdiffstats
path: root/tests/ui/inference/ambiguous_type_parameter.rs
blob: dc70ed661d2234515210458c0f5cdd333f1da573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::collections::HashMap;

trait Store<K, V> {
    fn get_raw(&self, key: &K) -> Option<()>;
}

struct InMemoryStore;

impl<K> Store<String, HashMap<K, String>> for InMemoryStore {
    fn get_raw(&self, key: &String) -> Option<()> {
        None
    }
}

fn main() {
    InMemoryStore.get_raw(&String::default()); //~ ERROR type annotations needed
}