aboutsummaryrefslogtreecommitdiff
path: root/crates/proc_macro_srv
diff options
context:
space:
mode:
Diffstat (limited to 'crates/proc_macro_srv')
-rw-r--r--crates/proc_macro_srv/Cargo.toml2
-rw-r--r--crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs2
-rw-r--r--crates/proc_macro_srv/src/rustc_server.rs2
-rw-r--r--crates/proc_macro_srv/src/tests/mod.rs8
-rw-r--r--crates/proc_macro_srv/src/tests/utils.rs2
5 files changed, 8 insertions, 8 deletions
diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml
index f78c17194..83f9ead17 100644
--- a/crates/proc_macro_srv/Cargo.toml
+++ b/crates/proc_macro_srv/Cargo.toml
@@ -20,7 +20,7 @@ proc_macro_api = { path = "../proc_macro_api", version = "0.0.0" }
20test_utils = { path = "../test_utils", version = "0.0.0" } 20test_utils = { path = "../test_utils", version = "0.0.0" }
21 21
22[dev-dependencies] 22[dev-dependencies]
23cargo_metadata = "=0.12.0" 23cargo_metadata = "0.12.2"
24 24
25# used as proc macro test targets 25# used as proc macro test targets
26serde_derive = "1.0.106" 26serde_derive = "1.0.106"
diff --git a/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs b/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs
index 3528d5c99..bd1e7c2fc 100644
--- a/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs
+++ b/crates/proc_macro_srv/src/proc_macro/bridge/rpc.rs
@@ -251,7 +251,7 @@ impl<S> DecodeMut<'_, '_, S> for String {
251 } 251 }
252} 252}
253 253
254/// Simplied version of panic payloads, ignoring 254/// Simplified version of panic payloads, ignoring
255/// types other than `&'static str` and `String`. 255/// types other than `&'static str` and `String`.
256#[derive(Debug)] 256#[derive(Debug)]
257pub enum PanicMessage { 257pub enum PanicMessage {
diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs
index b54aa1f3b..e6006a3c8 100644
--- a/crates/proc_macro_srv/src/rustc_server.rs
+++ b/crates/proc_macro_srv/src/rustc_server.rs
@@ -4,7 +4,7 @@
4//! The lib-proc-macro server backend is `TokenStream`-agnostic, such that 4//! The lib-proc-macro server backend is `TokenStream`-agnostic, such that
5//! we could provide any TokenStream implementation. 5//! we could provide any TokenStream implementation.
6//! The original idea from fedochet is using proc-macro2 as backend, 6//! The original idea from fedochet is using proc-macro2 as backend,
7//! we use tt instead for better intergation with RA. 7//! we use tt instead for better integration with RA.
8//! 8//!
9//! FIXME: No span and source file information is implemented yet 9//! FIXME: No span and source file information is implemented yet
10 10
diff --git a/crates/proc_macro_srv/src/tests/mod.rs b/crates/proc_macro_srv/src/tests/mod.rs
index 1a827cbd7..fd54f8dfd 100644
--- a/crates/proc_macro_srv/src/tests/mod.rs
+++ b/crates/proc_macro_srv/src/tests/mod.rs
@@ -38,9 +38,9 @@ fn test_derive_proc_macro_list() {
38 let res = list("serde_derive", "1").join("\n"); 38 let res = list("serde_derive", "1").join("\n");
39 39
40 assert_eq_text!( 40 assert_eq_text!(
41 &res,
42 r#"Serialize [CustomDerive] 41 r#"Serialize [CustomDerive]
43Deserialize [CustomDerive]"# 42Deserialize [CustomDerive]"#,
43 &res
44 ); 44 );
45} 45}
46 46
@@ -50,9 +50,9 @@ fn list_test_macros() {
50 let res = list("proc_macro_test", "0.0.0").join("\n"); 50 let res = list("proc_macro_test", "0.0.0").join("\n");
51 51
52 assert_eq_text!( 52 assert_eq_text!(
53 &res,
54 r#"function_like_macro [FuncLike] 53 r#"function_like_macro [FuncLike]
55attribute_macro [Attr] 54attribute_macro [Attr]
56DummyTrait [CustomDerive]"# 55DummyTrait [CustomDerive]"#,
56 &res
57 ); 57 );
58} 58}
diff --git a/crates/proc_macro_srv/src/tests/utils.rs b/crates/proc_macro_srv/src/tests/utils.rs
index 36942147d..196abb8fc 100644
--- a/crates/proc_macro_srv/src/tests/utils.rs
+++ b/crates/proc_macro_srv/src/tests/utils.rs
@@ -52,7 +52,7 @@ pub fn assert_expand(
52 let fixture = parse_string(ra_fixture).unwrap(); 52 let fixture = parse_string(ra_fixture).unwrap();
53 53
54 let res = expander.expand(macro_name, &fixture.subtree, None).unwrap(); 54 let res = expander.expand(macro_name, &fixture.subtree, None).unwrap();
55 assert_eq_text!(&format!("{:?}", res), &expect.trim()); 55 assert_eq_text!(&expect.trim(), &format!("{:?}", res));
56} 56}
57 57
58pub fn list(crate_name: &str, version: &str) -> Vec<String> { 58pub fn list(crate_name: &str, version: &str) -> Vec<String> {