]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/str-concat.rs
test: Remove all uses of `~str` from the test suite.
[rust.git] / src / test / run-pass / str-concat.rs
index 7fcf54bf26b1408a9d3f7ea83d26a1e53e70c69c..cecde7f8838d86690fde83bc598642f573ed7589 100644 (file)
@@ -12,9 +12,9 @@
 
 
 pub fn main() {
-    let a: ~str = "hello".to_owned();
-    let b: ~str = "world".to_owned();
-    let s: ~str = a + b;
+    let a: StrBuf = "hello".to_strbuf();
+    let b: StrBuf = "world".to_strbuf();
+    let s: StrBuf = format_strbuf!("{}{}", a, b);
     println!("{}", s.clone());
-    assert_eq!(s[9], 'd' as u8);
+    assert_eq!(s.as_slice()[9], 'd' as u8);
 }