mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 07:00:47 +00:00
15 lines
219 B
Rust
15 lines
219 B
Rust
//@ run-pass
|
|
|
|
|
|
fn bar(v: &mut [usize]) {
|
|
v.reverse();
|
|
v.reverse();
|
|
v.reverse();
|
|
}
|
|
|
|
pub fn main() {
|
|
let mut the_vec = vec![1, 2, 3, 100];
|
|
bar(&mut the_vec);
|
|
assert_eq!(the_vec, [100, 3, 2, 1]);
|
|
}
|