Skip to content

Commit

Permalink
make custom mir ICE a bit nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jun 26, 2023
1 parent 0d03812 commit c6e6ceb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/rustc_mir_build/src/build/custom/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
}
}
Expand Down

0 comments on commit c6e6ceb

Please sign in to comment.