summary refs log tree commit diff
path: root/src/test/compile-fail/while-loop-constraints.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/while-loop-constraints.rs')
-rw-r--r--src/test/compile-fail/while-loop-constraints.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/compile-fail/while-loop-constraints.rs b/src/test/compile-fail/while-loop-constraints.rs
new file mode 100644
index 00000000000..981a555ff30
--- /dev/null
+++ b/src/test/compile-fail/while-loop-constraints.rs
@@ -0,0 +1,17 @@
+// xfail-stage0
+// error-pattern: Unsatisfied precondition constraint (for example, init(y
+fn main() {
+
+  let int y = 42;
+  let int x;
+  while (true) {
+    log y;
+    while (true) {
+      while (true) {
+	while (true) {
+	  x <- y;
+	}
+      }
+    }
+  }
+}
\ No newline at end of file