mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Set current working directory for procedural macros
This commit is contained in:
parent
e149a15edd
commit
6051318744
3 changed files with 28 additions and 0 deletions
|
@ -48,6 +48,8 @@ pub struct ExpandMacro {
|
|||
|
||||
/// Environment variables to set during macro expansion.
|
||||
pub env: Vec<(String, String)>,
|
||||
|
||||
pub current_dir: Option<String>,
|
||||
}
|
||||
|
||||
pub trait Message: Serialize + DeserializeOwned {
|
||||
|
@ -143,6 +145,7 @@ mod tests {
|
|||
attributes: None,
|
||||
lib: std::env::current_dir().unwrap(),
|
||||
env: Default::default(),
|
||||
current_dir: Default::default(),
|
||||
};
|
||||
|
||||
let json = serde_json::to_string(&task).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue