summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-21655.rs
blob: d1cd4ec7b8a01995d1e76c34820e18c2abce14da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass

fn test(it: &mut dyn Iterator<Item=i32>) {
    for x in it {
        assert_eq!(x, 1)
    }
}

fn main() {
    let v = vec![1];
    test(&mut v.into_iter())
}