diff options
Diffstat (limited to 'crates/rust-analyzer/tests/heavy_tests/main.rs')
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/main.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/rust-analyzer/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs index 1dd2676b6..b31533e5e 100644 --- a/crates/rust-analyzer/tests/heavy_tests/main.rs +++ b/crates/rust-analyzer/tests/heavy_tests/main.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | mod support; | 1 | mod support; |
2 | 2 | ||
3 | use std::{collections::HashMap, time::Instant}; | 3 | use std::{collections::HashMap, path::PathBuf, time::Instant}; |
4 | 4 | ||
5 | use lsp_types::{ | 5 | use lsp_types::{ |
6 | CodeActionContext, DidOpenTextDocumentParams, DocumentFormattingParams, FormattingOptions, | 6 | CodeActionContext, DidOpenTextDocumentParams, DocumentFormattingParams, FormattingOptions, |
@@ -692,15 +692,10 @@ 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 | 695 | let macro_srv_path = PathBuf::from(env!("CARGO_BIN_EXE_rust-analyzer")); |
696 | // https://github.com/rust-lang/cargo/pull/7697 landed | ||
697 | let macro_srv_path = std::path::Path::new(std::env!("CARGO_MANIFEST_DIR")) | ||
698 | .join("../../target/debug/rust-analyzer") | ||
699 | .to_string_lossy() | ||
700 | .to_string(); | ||
701 | 696 | ||
702 | config.cargo.load_out_dirs_from_check = true; | 697 | config.cargo.load_out_dirs_from_check = true; |
703 | config.proc_macro_srv = Some((macro_srv_path, vec!["proc-macro".to_string()])); | 698 | config.proc_macro_srv = Some((macro_srv_path, vec!["proc-macro".into()])); |
704 | }) | 699 | }) |
705 | .root("foo") | 700 | .root("foo") |
706 | .root("bar") | 701 | .root("bar") |