13 lines
177 B
Rust
13 lines
177 B
Rust
// run-pass
|
|
|
|
pub fn main() {
|
|
let mut x = 0;
|
|
{
|
|
let iter = (0..5).map(|_| {
|
|
x += 1;
|
|
});
|
|
().extend(iter);
|
|
}
|
|
assert_eq!(x, 5);
|
|
}
|