about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-10-27 17:22:01 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-10-27 17:38:57 -0700
commit5e5ea0460879972dd9b78516cdee2e65be7fad93 (patch)
tree028ca59ccf7158d2132c43260d5590ed96ea9bc4 /src
parent64193a9eb860b0a284472da3ed9ef85854883066 (diff)
downloadrust-5e5ea0460879972dd9b78516cdee2e65be7fad93.tar.gz
rust-5e5ea0460879972dd9b78516cdee2e65be7fad93.zip
Make class-cast-to-trait compile (not sure why this worked before)
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/class-cast-to-trait.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs
index 5292e301ac0..70b1c4c9fbb 100644
--- a/src/test/compile-fail/class-cast-to-trait.rs
+++ b/src/test/compile-fail/class-cast-to-trait.rs
@@ -7,7 +7,7 @@ struct cat {
   priv mut meows : uint,
 
   mut how_hungry : int,
-  name : str,
+  name : ~str,
 }
 
 impl cat {
@@ -33,14 +33,14 @@ impl cat : noisy {
 priv impl cat {
     fn meow() {
       error!("Meow");
-      self.meows += 1u;
-      if self.meows % 5u == 0u {
+      self.meows += 1;
+      if self.meows % 5 == 0 {
           self.how_hungry += 1;
       }
     }
 }
 
-fn cat(in_x : uint, in_y : int, in_name: str) -> cat {
+fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
     cat {
         meows: in_x,
         how_hungry: in_y,
@@ -49,6 +49,6 @@ fn cat(in_x : uint, in_y : int, in_name: str) -> cat {
 }
 
 fn main() {
-  let nyan : noisy  = cat(0u, 2, "nyan") as noisy;
+  let nyan : noisy  = cat(0, 2, ~"nyan") as noisy;
   nyan.eat();
 }