rust/src/test/run-pass/coerce-reborrow-imm-vec-rcvr.rs
Brian Anderson e08a805b30 Merge remote-tracking branch 'bstrie/rimov' into incoming
Conflicts:
	src/libsyntax/parse/parser.rs
	src/test/bench/graph500-bfs.rs
	src/test/bench/sudoku.rs
	src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
	src/test/run-pass/empty-mutable-vec.rs
	src/test/run-pass/foreach-nested.rs
	src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00

19 lines
325 B
Rust

fn foo(v: &[const uint]) -> ~[uint] {
v.to_vec()
}
fn bar(v: &mut [uint]) -> ~[uint] {
v.to_vec()
}
fn bip(v: &[uint]) -> ~[uint] {
v.to_vec()
}
pub fn main() {
let mut the_vec = ~[1, 2, 3, 100];
assert the_vec == foo(the_vec);
assert the_vec == bar(the_vec);
assert the_vec == bip(the_vec);
}