diff options
author | Edwin Cheng <[email protected]> | 2020-04-16 14:13:57 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-04-16 14:13:57 +0100 |
commit | 177becea98bddcd995a2abec59c6b60bac6b5a2b (patch) | |
tree | 64b7ecca11b93b71aab3e2fc0648d70aa012ee8b /crates/ra_proc_macro/src/lib.rs | |
parent | ca7dc69a8e87883c6a0c9df88c936fa2a4658c7b (diff) |
Add proc-macro cli command for rust-analyzer
Diffstat (limited to 'crates/ra_proc_macro/src/lib.rs')
-rw-r--r-- | crates/ra_proc_macro/src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_proc_macro/src/lib.rs b/crates/ra_proc_macro/src/lib.rs index 63da9f1b4..14a675db2 100644 --- a/crates/ra_proc_macro/src/lib.rs +++ b/crates/ra_proc_macro/src/lib.rs | |||
@@ -56,8 +56,11 @@ pub struct ProcMacroClient { | |||
56 | } | 56 | } |
57 | 57 | ||
58 | impl ProcMacroClient { | 58 | impl ProcMacroClient { |
59 | pub fn extern_process(process_path: &Path) -> Result<ProcMacroClient, std::io::Error> { | 59 | pub fn extern_process<T: AsRef<str>>( |
60 | let (thread, process) = ProcMacroProcessSrv::run(process_path)?; | 60 | process_path: &Path, |
61 | args: &[T], | ||
62 | ) -> Result<ProcMacroClient, std::io::Error> { | ||
63 | let (thread, process) = ProcMacroProcessSrv::run(process_path, args)?; | ||
61 | Ok(ProcMacroClient { | 64 | Ok(ProcMacroClient { |
62 | kind: ProcMacroClientKind::Process { process: Arc::new(process), thread }, | 65 | kind: ProcMacroClientKind::Process { process: Arc::new(process), thread }, |
63 | }) | 66 | }) |