mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Peek for panic message in test output
This commit is contained in:
parent
6de838c255
commit
3b9a2af21f
9 changed files with 36 additions and 12 deletions
|
@ -428,6 +428,17 @@ impl MirEvalError {
|
|||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn is_panic(&self) -> Option<&str> {
|
||||
let mut err = self;
|
||||
while let MirEvalError::InFunction(e, _) = err {
|
||||
err = e;
|
||||
}
|
||||
match err {
|
||||
MirEvalError::Panic(msg) => Some(msg),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for MirEvalError {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue