mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add proc-macro cli command for rust-analyzer
This commit is contained in:
parent
ca7dc69a8e
commit
177becea98
14 changed files with 47 additions and 26 deletions
|
@ -56,8 +56,11 @@ pub struct ProcMacroClient {
|
|||
}
|
||||
|
||||
impl ProcMacroClient {
|
||||
pub fn extern_process(process_path: &Path) -> Result<ProcMacroClient, std::io::Error> {
|
||||
let (thread, process) = ProcMacroProcessSrv::run(process_path)?;
|
||||
pub fn extern_process<T: AsRef<str>>(
|
||||
process_path: &Path,
|
||||
args: &[T],
|
||||
) -> Result<ProcMacroClient, std::io::Error> {
|
||||
let (thread, process) = ProcMacroProcessSrv::run(process_path, args)?;
|
||||
Ok(ProcMacroClient {
|
||||
kind: ProcMacroClientKind::Process { process: Arc::new(process), thread },
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue