Expand proc-macros in workspace root, not package root

This commit is contained in:
Lukas Wirth 2024-08-27 12:30:04 +02:00
parent 2025b43653
commit 9a47e6f2c8
7 changed files with 34 additions and 14 deletions

View file

@ -154,7 +154,8 @@ impl ProcMacro {
mixed_site: Span,
) -> Result<Result<tt::Subtree<Span>, PanicMessage>, ServerError> {
let version = self.process.version();
let current_dir = env.get("CARGO_MANIFEST_DIR");
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;