make custom mir ICE a bit nicer
This commit is contained in:
parent
0d03812e24
commit
c6e6ceb078
1 changed files with 5 additions and 1 deletions
|
@ -118,7 +118,11 @@ fn parse_attribute(attr: &Attribute) -> MirPhase {
|
|||
phase = Some(value);
|
||||
}
|
||||
other => {
|
||||
panic!("Unexpected key {}", other);
|
||||
span_bug!(
|
||||
nested.span(),
|
||||
"Unexpected key while parsing custom_mir attribute: '{}'",
|
||||
other
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue