]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/while-prelude-drop.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / while-prelude-drop.rs
index 358d296de495407808ad306beda858c50f1fa6c6..bfabcb4d87b562df318e59bf34e14076baf277cf 100644 (file)
@@ -8,18 +8,18 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::strbuf::StrBuf;
+use std::string::String;
 
-#[deriving(Eq)]
-enum t { a, b(StrBuf), }
+#[derive(PartialEq)]
+enum t { a, b(String), }
 
 fn make(i: int) -> t {
-    if i > 10 { return a; }
-    let mut s = StrBuf::from_str("hello");
+    if i > 10 { return t::a; }
+    let mut s = String::from_str("hello");
     // Ensure s is non-const.
 
     s.push_str("there");
-    return b(s);
+    return t::b(s);
 }
 
 pub fn main() {
@@ -27,5 +27,5 @@ pub fn main() {
 
 
     // The auto slot for the result of make(i) should not leak.
-    while make(i) != a { i += 1; }
+    while make(i) != t::a { i += 1; }
 }