blob: c6f9e3456186ce0351736d1fe49668860b90e70d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
fn use_iterator<I>(itr: I)
where
I: IntoIterator<Item = i32>,
{
}
fn pass_iterator<I>(i: &dyn IntoIterator<Item = i32, IntoIter = I>)
where
I: Iterator<Item = i32>,
{
use_iterator(i);
//~^ ERROR `&dyn IntoIterator<IntoIter = I, Item = i32>` is not an iterator
}
fn main() {}
|