]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/auto-ref-slice-plus-ref.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / auto-ref-slice-plus-ref.rs
index c22e25e5d95be099d257932b7f5a524857bafcbf..8e0bdfdc74076620176e365d0f818a2553f7817c 100644 (file)
@@ -11,7 +11,7 @@
 // Testing that method lookup automatically both borrows vectors to slices
 // and also references them to create the &self pointer
 
-#[feature(managed_boxes)];
+#![feature(managed_boxes)]
 
 trait MyIter {
     fn test_imm(&self);
@@ -29,10 +29,10 @@ pub fn main() {
     // NB: Associativity of ~, etc. in this context is surprising. These must be parenthesized
 
     ([1]).test_imm();
-    (~[1]).test_imm();
+    (vec!(1)).as_slice().test_imm();
     (&[1]).test_imm();
     ("test").test_imm();
-    (~"test").test_imm();
+    ("test".to_owned()).test_imm();
     (&"test").test_imm();
 
     // FIXME: Other types of mutable vecs don't currently exist