mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
13 lines
172 B
Rust
13 lines
172 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())
|
|
}
|