about summary refs log tree commit diff
path: root/src/test/compile-fail/while-loop-pred-constraints.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-07-27 14:19:39 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-07-27 15:54:33 +0200
commitdf7f21db093b0f206048b18e977161f91b7c28f1 (patch)
tree36c56d12572266bd0b8d2b3379e52d04bf0e9152 /src/test/compile-fail/while-loop-pred-constraints.rs
parent0e3ee39c41462652f41993a5610265abea6daa96 (diff)
downloadrust-df7f21db093b0f206048b18e977161f91b7c28f1.tar.gz
rust-df7f21db093b0f206048b18e977161f91b7c28f1.zip
Reformat for new syntax
Diffstat (limited to 'src/test/compile-fail/while-loop-pred-constraints.rs')
-rw-r--r--src/test/compile-fail/while-loop-pred-constraints.rs26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/test/compile-fail/while-loop-pred-constraints.rs b/src/test/compile-fail/while-loop-pred-constraints.rs
index 3908004b688..0defbe2e40c 100644
--- a/src/test/compile-fail/while-loop-pred-constraints.rs
+++ b/src/test/compile-fail/while-loop-pred-constraints.rs
@@ -1,27 +1,17 @@
 // xfail-stage0
 // error-pattern: Unsatisfied precondition constraint (for example, even(y
 
-fn print_even(int y) : even(y) {
-  log y;
-}
+fn print_even(y: int) { log y; }
 
-pred even(int y) -> bool {
-  true
-}
+pred even(y: int) -> bool { true }
 
 fn main() {
 
-  let int y = 42;
-  let int x = 1;
-  check even(y);
-  while (true) {
-    print_even(y);
-    while (true) {
-      while (true) {
-    while (true) {
-      y += x;
+    let y: int = 42;
+    let x: int = 1;
+    check (even(y));
+    while true {
+        print_even(y);
+        while true { while true { while true { y += x; } } }
     }
-      }
-    }
-  }
 }
\ No newline at end of file