Rollup merge of #113039 - matthiaskrgr:custom_mir, r=compiler-errors

make custom mir ICE a bit nicer
This commit is contained in:
Matthias Krüger 2023-06-27 07:01:32 +02:00 committed by GitHub
commit a144272eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
);
}
}
}