mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-18 17:40:29 +00:00
Don't discard attributed items when a proc-macro unexpectedly fails to expand
This commit is contained in:
parent
54e6583f53
commit
98cff6572d
2 changed files with 23 additions and 13 deletions
|
@ -167,7 +167,7 @@ impl ProcMacro {
|
|||
let request = msg::Request::ExpandMacro(task);
|
||||
let response = self.process.lock().unwrap_or_else(|e| e.into_inner()).send_task(request)?;
|
||||
match response {
|
||||
msg::Response::ExpandMacro(it) => Ok(it.map(|it| it.to_subtree())),
|
||||
msg::Response::ExpandMacro(it) => Ok(it.map(FlatTree::to_subtree)),
|
||||
msg::Response::ListMacros { .. } => {
|
||||
Err(ServerError { message: "unexpected response".to_string(), io: None })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue