1 // revisions: base extended
3 #![feature(generic_associated_types)]
4 #![cfg_attr(extended, feature(generic_associated_types_extended))]
5 #![cfg_attr(extended, allow(incomplete_features))]
7 trait StreamingIterator {
8 type Item<'a> where Self: 'a;
9 fn size_hint(&self) -> (usize, Option<usize>);
10 // Uncommenting makes `StreamingIterator` not object safe
11 // fn next(&mut self) -> Self::Item<'_>;
14 fn min_size(x: &mut dyn for<'a> StreamingIterator<Item<'a> = &'a i32>) -> usize {
15 //[base]~^ the trait `StreamingIterator` cannot be made into an object
17 //[extended]~^ borrowed data escapes