diff --git a/src/lib/vec.rs b/src/lib/vec.rs index 5fbbb72d9f0..f1633194f90 100644 --- a/src/lib/vec.rs +++ b/src/lib/vec.rs @@ -796,7 +796,7 @@ mod unsafe { modifing its buffers, so it is up to the caller to ensure that the vector is actually the specified size. */ - unsafe fn set_len(&v: [T], new_len: uint) { + unsafe fn set_len(&v: [mutable? T], new_len: uint) { let repr: **vec_repr = ::unsafe::reinterpret_cast(addr_of(v)); (**repr).fill = new_len * sys::size_of::(); } @@ -812,7 +812,7 @@ mod unsafe { Modifying the vector may cause its buffer to be reallocated, which would also make any pointers to it invalid. */ - unsafe fn to_ptr(v: [T]) -> *T { + unsafe fn to_ptr(v: [mutable? T]) -> *T { let repr: **vec_repr = ::unsafe::reinterpret_cast(addr_of(v)); ret ::unsafe::reinterpret_cast(addr_of((**repr).data)); }