aboutsummaryrefslogtreecommitdiffstats
path: root/lua/tests/indent/rust
diff options
context:
space:
mode:
authorJędrzej Boczar <yendreij@gmail.com>2021-04-22 20:53:30 +0200
committerKiyan <yazdani.kiyan@protonmail.com>2021-04-23 21:21:38 +0200
commit63a88c873f3643aad9208488765dc53618edd40e (patch)
treefb233a54b0dae8a6af1a12dfecb9cd85cbdb4f64 /lua/tests/indent/rust
parentignore Lua indent test files when doing style-check (diff)
downloadnvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.gz
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.bz2
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.lz
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.xz
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.tar.zst
nvim-treesitter-63a88c873f3643aad9208488765dc53618edd40e.zip
move all tests to top-level tests/ directory
Diffstat (limited to 'lua/tests/indent/rust')
-rw-r--r--lua/tests/indent/rust/array.rs11
-rw-r--r--lua/tests/indent/rust/comment.rs7
-rw-r--r--lua/tests/indent/rust/cond.rs17
-rw-r--r--lua/tests/indent/rust/enum.rs11
-rw-r--r--lua/tests/indent/rust/func.rs10
-rw-r--r--lua/tests/indent/rust/impl.rs7
-rw-r--r--lua/tests/indent/rust/loop.rs19
-rw-r--r--lua/tests/indent/rust/macro.rs13
-rw-r--r--lua/tests/indent/rust/match.rs11
-rw-r--r--lua/tests/indent/rust/mod.rs8
-rw-r--r--lua/tests/indent/rust/string.rs12
-rw-r--r--lua/tests/indent/rust/struct.rs4
-rw-r--r--lua/tests/indent/rust/trait.rs11
-rw-r--r--lua/tests/indent/rust/where.rs21
14 files changed, 0 insertions, 162 deletions
diff --git a/lua/tests/indent/rust/array.rs b/lua/tests/indent/rust/array.rs
deleted file mode 100644
index 68344e0ee..000000000
--- a/lua/tests/indent/rust/array.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-const X: [i32; 2] = [
- 1,
- 2,
-];
-
-fn foo() {
- let _x = [
- 1,
- 2,
- ];
-}
diff --git a/lua/tests/indent/rust/comment.rs b/lua/tests/indent/rust/comment.rs
deleted file mode 100644
index 334793dfa..000000000
--- a/lua/tests/indent/rust/comment.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-/// Function foo
-///
-/// Description of
-/// function foo.
-fn foo(x: i32, y: i32) -> i32 {
- x + y
-}
diff --git a/lua/tests/indent/rust/cond.rs b/lua/tests/indent/rust/cond.rs
deleted file mode 100644
index eb96a48f7..000000000
--- a/lua/tests/indent/rust/cond.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-fn foo(mut x: i32) -> i32 {
- if x > 10 {
- return 10;
- } else if x == 10 {
- return 9;
- } else {
- x += 10;
- }
-
- if x < 0 {
- if x == -1 {
- return 0;
- }
- }
-
- 0
-}
diff --git a/lua/tests/indent/rust/enum.rs b/lua/tests/indent/rust/enum.rs
deleted file mode 100644
index 996f07d21..000000000
--- a/lua/tests/indent/rust/enum.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-enum Foo {
- X,
- Y(
- char,
- char,
- ),
- Z {
- x: u32,
- y: u32,
- },
-}
diff --git a/lua/tests/indent/rust/func.rs b/lua/tests/indent/rust/func.rs
deleted file mode 100644
index 4c9d40b26..000000000
--- a/lua/tests/indent/rust/func.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-fn foo() -> i32 {
- 1
-}
-
-fn foo(
- x: i32,
- y: i32
-) -> i32 {
- x + y
-}
diff --git a/lua/tests/indent/rust/impl.rs b/lua/tests/indent/rust/impl.rs
deleted file mode 100644
index 2525c2e5b..000000000
--- a/lua/tests/indent/rust/impl.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-struct Foo;
-
-impl Foo {
- fn foo() -> i32 {
- 1
- }
-}
diff --git a/lua/tests/indent/rust/loop.rs b/lua/tests/indent/rust/loop.rs
deleted file mode 100644
index eb845bc0f..000000000
--- a/lua/tests/indent/rust/loop.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-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;
- }
-}
diff --git a/lua/tests/indent/rust/macro.rs b/lua/tests/indent/rust/macro.rs
deleted file mode 100644
index 608e157fc..000000000
--- a/lua/tests/indent/rust/macro.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-macro_rules! foo {
- ($a:ident, $b:ident, $c:ident) => {
- struct $a;
- struct $b;
- },
- ($a:ident) => {
- struct $a;
- },
-}
-
-foo! {
- A
-}
diff --git a/lua/tests/indent/rust/match.rs b/lua/tests/indent/rust/match.rs
deleted file mode 100644
index 438ba6d5f..000000000
--- a/lua/tests/indent/rust/match.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-fn foo(x: i32) -> i32 {
- match x {
- 0 => 1,
- 1 => {
- 2
- },
- 2 | 3 => {
- 4
- }
- }
-}
diff --git a/lua/tests/indent/rust/mod.rs b/lua/tests/indent/rust/mod.rs
deleted file mode 100644
index cc7f2c8e6..000000000
--- a/lua/tests/indent/rust/mod.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-mod foo {
- const X: i32 = 1;
-
- mod bar {
-
- const Y: i32 = 1;
- }
-}
diff --git a/lua/tests/indent/rust/string.rs b/lua/tests/indent/rust/string.rs
deleted file mode 100644
index 4d60663dd..000000000
--- a/lua/tests/indent/rust/string.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-fn foo() {
- let a = "hello
-world";
-
- let b = "hello\
- world";
-
- let c = r#"
- hello
- world
- "#;
-}
diff --git a/lua/tests/indent/rust/struct.rs b/lua/tests/indent/rust/struct.rs
deleted file mode 100644
index f3828977f..000000000
--- a/lua/tests/indent/rust/struct.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-struct Foo {
- x: u32,
- y: u32,
-}
diff --git a/lua/tests/indent/rust/trait.rs b/lua/tests/indent/rust/trait.rs
deleted file mode 100644
index fb5fc7ea8..000000000
--- a/lua/tests/indent/rust/trait.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-struct Foo;
-
-trait Bar {
- fn bar();
-}
-
-impl Bar for Foo {
- fn bar() {
-
- }
-}
diff --git a/lua/tests/indent/rust/where.rs b/lua/tests/indent/rust/where.rs
deleted file mode 100644
index 08c1b196d..000000000
--- a/lua/tests/indent/rust/where.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-fn foo<T>(t: T) -> i32
-where
- T: Debug,
-{
- 1
-}
-
-fn foo<T>(t: T) -> i32 where
- T: Debug,
-{
- 1
-}
-
-struct Foo<T>(T);
-
-impl<T> Write for Foo<T>
-where
- T: Debug,
-{
-
-}