]> git.lizzy.rs Git - rust.git/blob - tests/ui/btreemap/btreemap_into_iterator_lifetime.rs
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[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() {}