]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/writing-to-immutable-vec.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / test / compile-fail / writing-to-immutable-vec.rs
index 987a3c1674c28ab56205b0a611c39ad2e087fc70..00d537f95bf984df0de8f5a8a2e6ef355d579c51 100644 (file)
@@ -8,7 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec_ng::Vec;
+
 fn main() {
     let v: Vec<int> = vec!(1, 2, 3);
-    v[1] = 4; //~ ERROR cannot assign
+    *v.get(1) = 4; //~ ERROR cannot assign
 }