about summary refs log tree commit diff
path: root/tests/ui/for-loop-while
diff options
context:
space:
mode:
authorCaio <c410.f3r@gmail.com>2023-05-14 09:49:20 -0300
committerCaio <c410.f3r@gmail.com>2023-05-24 19:35:59 -0300
commit25e395653df2a91fc9a76dfd3ef050f1c7ba9fca (patch)
tree317f278dbb889c435dad7c895a9ac007fd4238a8 /tests/ui/for-loop-while
parentc373194cb6d882dc455a588bcc29c92a96b50252 (diff)
downloadrust-25e395653df2a91fc9a76dfd3ef050f1c7ba9fca.tar.gz
rust-25e395653df2a91fc9a76dfd3ef050f1c7ba9fca.zip
Move tests
Diffstat (limited to 'tests/ui/for-loop-while')
-rw-r--r--tests/ui/for-loop-while/issue-1257.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/for-loop-while/issue-1257.rs b/tests/ui/for-loop-while/issue-1257.rs
new file mode 100644
index 00000000000..de5a6d35925
--- /dev/null
+++ b/tests/ui/for-loop-while/issue-1257.rs
@@ -0,0 +1,11 @@
+// run-pass
+// pretty-expanded FIXME #23616
+
+pub fn main () {
+  let mut line = "".to_string();
+  let mut i = 0;
+  while line != "exit".to_string() {
+    line = if i == 9 { "exit".to_string() } else { "notexit".to_string() };
+    i += 1;
+  }
+}