mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-09 20:06:28 +00:00
Properly set the working directory for proc-macro execution
This commit is contained in:
parent
db04f514f2
commit
c2258d8880
5 changed files with 29 additions and 5 deletions
|
@ -152,10 +152,9 @@ impl ProcMacro {
|
|||
def_site: Span,
|
||||
call_site: Span,
|
||||
mixed_site: Span,
|
||||
current_dir: Option<String>,
|
||||
) -> Result<Result<tt::Subtree<Span>, PanicMessage>, ServerError> {
|
||||
let version = self.process.version();
|
||||
let current_dir =
|
||||
env.get("CARGO_RUSTC_CURRENT_DIR").or_else(|| env.get("CARGO_MANIFEST_DIR"));
|
||||
|
||||
let mut span_data_table = SpanDataIndexMap::default();
|
||||
let def_site = span_data_table.insert_full(def_site).0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue