rust/tests/ui/issues/issue-21655.rs
2024-02-16 20:02:50 +00:00

12 lines
173 B
Rust

//@ 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())
}