1 #![feature(generic_associated_types)]
3 trait StreamingIterator {
4 type Item<'a> where Self: 'a;
5 fn size_hint(&self) -> (usize, Option<usize>);
6 // Uncommenting makes `StreamingIterator` not object safe
7 // fn next(&mut self) -> Self::Item<'_>;
10 fn min_size(x: &mut dyn for<'a> StreamingIterator<Item<'a> = &'a i32>) -> usize {
11 //~^ the trait `StreamingIterator` cannot be made into an object