3 use std::collections::HashSet;
5 // See rust-lang/rust-clippy#2774.
7 #[derive(Eq, PartialEq, Debug, Hash)]
12 #[derive(Eq, PartialEq, Debug, Hash)]
15 #[allow(clippy::implicit_hasher)]
16 // This should not cause a "cannot relate bound region" ICE.
17 pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) {
18 let mut foos = HashSet::new();
19 foos.extend(bars.iter().map(|b| &b.foo));
22 #[allow(clippy::implicit_hasher)]
23 // Also, this should not cause a "cannot relate bound region" ICE.
24 pub fn add_barfoos_to_foos2(bars: &HashSet<&Bar>) {
25 let mut foos = HashSet::new();
26 foos.extend(bars.iter().map(|b| &b.foo));