mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +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
|
@ -493,8 +493,17 @@ impl ProcMacroExpander for Expander {
|
|||
def_site: Span,
|
||||
call_site: Span,
|
||||
mixed_site: Span,
|
||||
current_dir: Option<String>,
|
||||
) -> Result<tt::Subtree<Span>, ProcMacroExpansionError> {
|
||||
match self.0.expand(subtree, attrs, env.clone(), def_site, call_site, mixed_site) {
|
||||
match self.0.expand(
|
||||
subtree,
|
||||
attrs,
|
||||
env.clone(),
|
||||
def_site,
|
||||
call_site,
|
||||
mixed_site,
|
||||
current_dir,
|
||||
) {
|
||||
Ok(Ok(subtree)) => Ok(subtree),
|
||||
Ok(Err(err)) => Err(ProcMacroExpansionError::Panic(err.0)),
|
||||
Err(err) => Err(ProcMacroExpansionError::System(err.to_string())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue