]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/string-self-append.rs
test: Remove all uses of `~str` from the test suite.
[rust.git] / src / test / run-pass / string-self-append.rs
index 8a5d2d83ac6420413424630767e5b2e858c5435a..619ee761e9c6aec03f2437dac312486617c5935a 100644 (file)
 
 pub fn main() {
     // Make sure we properly handle repeated self-appends.
-    let mut a: ~str = "A".to_owned();
+    let mut a: StrBuf = "A".to_strbuf();
     let mut i = 20;
     let mut expected_len = 1u;
     while i > 0 {
         println!("{}", a.len());
         assert_eq!(a.len(), expected_len);
-        a = a + a; // FIXME(#3387)---can't write a += a
+        a = format_strbuf!("{}{}", a, a);
         i -= 1;
         expected_len *= 2u;
     }