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/rust-analyzer/tests | |
parent | ca7dc69a8e87883c6a0c9df88c936fa2a4658c7b (diff) |
Add proc-macro cli command for rust-analyzer
Diffstat (limited to 'crates/rust-analyzer/tests')
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/rust-analyzer/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs index 26ab81a8f..1dd2676b6 100644 --- a/crates/rust-analyzer/tests/heavy_tests/main.rs +++ b/crates/rust-analyzer/tests/heavy_tests/main.rs | |||
@@ -692,13 +692,15 @@ pub fn foo(_input: TokenStream) -> TokenStream { | |||
692 | "###, | 692 | "###, |
693 | ) | 693 | ) |
694 | .with_config(|config| { | 694 | .with_config(|config| { |
695 | // FIXME: Use env!("CARGO_BIN_EXE_ra-analyzer") instead after | ||
696 | // https://github.com/rust-lang/cargo/pull/7697 landed | ||
695 | let macro_srv_path = std::path::Path::new(std::env!("CARGO_MANIFEST_DIR")) | 697 | let macro_srv_path = std::path::Path::new(std::env!("CARGO_MANIFEST_DIR")) |
696 | .join("../../target/debug/ra_proc_macro_srv") | 698 | .join("../../target/debug/rust-analyzer") |
697 | .to_string_lossy() | 699 | .to_string_lossy() |
698 | .to_string(); | 700 | .to_string(); |
699 | 701 | ||
700 | config.cargo.load_out_dirs_from_check = true; | 702 | config.cargo.load_out_dirs_from_check = true; |
701 | config.proc_macro_srv = Some(macro_srv_path) | 703 | config.proc_macro_srv = Some((macro_srv_path, vec!["proc-macro".to_string()])); |
702 | }) | 704 | }) |
703 | .root("foo") | 705 | .root("foo") |
704 | .root("bar") | 706 | .root("bar") |