// check-pass use std::collections::{BTreeMap, HashMap}; trait Map where for<'a> &'a Self: IntoIterator, { type Key; type Value; } impl Map for HashMap { type Key = K; type Value = V; } impl Map for BTreeMap { type Key = K; type Value = V; } fn main() {}