summaryrefslogtreecommitdiff
path: root/test/lspfixture/client
diff options
context:
space:
mode:
Diffstat (limited to 'test/lspfixture/client')
-rw-r--r--test/lspfixture/client/Cargo.toml11
-rw-r--r--test/lspfixture/client/lib.rs4
-rw-r--r--test/lspfixture/client/main.rs7
3 files changed, 22 insertions, 0 deletions
diff --git a/test/lspfixture/client/Cargo.toml b/test/lspfixture/client/Cargo.toml
new file mode 100644
index 00000000..01a28899
--- /dev/null
+++ b/test/lspfixture/client/Cargo.toml
@@ -0,0 +1,11 @@
+# Root marker for the client fixture: rootOf stops here, and a real
+# rust-analyzer pointed at this directory (instead of the mock) finds a
+# well-formed, dependency-free crate.
+[package]
+name = "lspfixture-client"
+version = "0.0.0"
+edition = "2021"
+
+[[bin]]
+name = "lspfixture-client"
+path = "main.rs"
diff --git a/test/lspfixture/client/lib.rs b/test/lspfixture/client/lib.rs
new file mode 100644
index 00000000..2887517e
--- /dev/null
+++ b/test/lspfixture/client/lib.rs
@@ -0,0 +1,4 @@
+// mock fixture
+pub fn add(a: i32, b: i32) -> i32 {
+ a + b
+}
diff --git a/test/lspfixture/client/main.rs b/test/lspfixture/client/main.rs
new file mode 100644
index 00000000..ab29f8bc
--- /dev/null
+++ b/test/lspfixture/client/main.rs
@@ -0,0 +1,7 @@
+mod lib;
+
+fn main() {
+ let x = add(1, 2);
+ let y = add(3, 4);
+ let _ = x + y;
+}