summaryrefslogtreecommitdiff
path: root/lua/tests/indent/rust/loop.rs
diff options
context:
space:
mode:
authorJędrzej Boczar <yendreij@gmail.com>2021-04-18 22:38:25 +0200
committerKiyan <yazdani.kiyan@protonmail.com>2021-04-23 21:21:38 +0200
commit1d7e5144ab0feb24629624d593b817a51b5aab8d (patch)
treed4eea1129213572e1c9fcc0c75849a46058da193 /lua/tests/indent/rust/loop.rs
parent69dda8c09db1ad1e4660c3d383faab48ba1792ab (diff)
tests/indent: improve Rust tests
Diffstat (limited to 'lua/tests/indent/rust/loop.rs')
-rw-r--r--lua/tests/indent/rust/loop.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/tests/indent/rust/loop.rs b/lua/tests/indent/rust/loop.rs
new file mode 100644
index 00000000..eb845bc0
--- /dev/null
+++ b/lua/tests/indent/rust/loop.rs
@@ -0,0 +1,19 @@
+fn foo(mut x: i32) {
+ while x > 0 {
+ x -= 1;
+ }
+
+ for i in 0..3 {
+ x += 1;
+ }
+
+ loop {
+ x += 1;
+
+ if x < 100 {
+ continue;
+ }
+
+ break;
+ }
+}