mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Merge #6767
6767: Better error when a proc macro panics r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
70fa57f8d3
1 changed files with 2 additions and 1 deletions
|
@ -40,7 +40,8 @@ impl ProcMacroSrv {
|
|||
match expander.expand(&task.macro_name, &task.macro_body, task.attributes.as_ref()) {
|
||||
Ok(expansion) => Ok(ExpansionResult { expansion }),
|
||||
Err(msg) => {
|
||||
Err(format!("Cannot perform expansion for {}: error {:?}", &task.macro_name, msg))
|
||||
let msg = msg.as_str().unwrap_or("<unknown error>");
|
||||
Err(format!("proc-macro panicked: {}", msg))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue