2013-03-16 11:11:31 -07:00
|
|
|
// xfail-test
|
|
|
|
|
2013-03-22 17:58:50 -07:00
|
|
|
fn foo(v: &const [uint]) -> ~[uint] {
|
2013-01-22 17:20:08 -08:00
|
|
|
v.to_vec()
|
|
|
|
}
|
|
|
|
|
2013-01-29 21:30:22 -05:00
|
|
|
fn bar(v: &mut [uint]) -> ~[uint] {
|
2013-01-22 17:20:08 -08:00
|
|
|
v.to_vec()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bip(v: &[uint]) -> ~[uint] {
|
|
|
|
v.to_vec()
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2013-01-22 17:20:08 -08:00
|
|
|
let mut the_vec = ~[1, 2, 3, 100];
|
2013-03-28 18:39:09 -07:00
|
|
|
assert!(the_vec == foo(the_vec));
|
|
|
|
assert!(the_vec == bar(the_vec));
|
|
|
|
assert!(the_vec == bip(the_vec));
|
2013-01-22 17:20:08 -08:00
|
|
|
}
|