]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-5550.rs
test: Remove all uses of `~str` from the test suite.
[rust.git] / src / test / run-pass / issue-5550.rs
index b3d22ab1a376fe29ebac2001e7c4c235b416be03..d4962784b9ace02d5960d1980ca32917e86294d5 100644 (file)
@@ -11,7 +11,7 @@
 #![allow(dead_assignment)]
 
 pub fn main() {
-    let s: ~str = "foobar".to_owned();
-    let mut t: &str = s;
+    let s: StrBuf = "foobar".to_strbuf();
+    let mut t: &str = s.as_slice();
     t = t.slice(0, 3); // for master: str::view(t, 0, 3) maybe
 }