]> git.lizzy.rs Git - rust.git/blob - tests/ui/btreemap/btreemap_into_iterator_lifetime.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / btreemap / btreemap_into_iterator_lifetime.rs
1 // check-pass
2
3 use std::collections::{BTreeMap, HashMap};
4
5 trait Map
6 where
7     for<'a> &'a Self: IntoIterator<Item = (&'a Self::Key, &'a Self::Value)>,
8 {
9     type Key;
10     type Value;
11 }
12
13 impl<K, V> Map for HashMap<K, V> {
14     type Key = K;
15     type Value = V;
16 }
17
18 impl<K, V> Map for BTreeMap<K, V> {
19   type Key = K;
20   type Value = V;
21 }
22
23 fn main() {}