Skip to content
/ rust Public
forked from rust-lang/rust

Commit a144272

Browse files
authored
Rollup merge of rust-lang#113039 - matthiaskrgr:custom_mir, r=compiler-errors
make custom mir ICE a bit nicer
2 parents b9ad9b7 + c6e6ceb commit a144272

File tree

1 file changed

+5
-1
lines changed
  • compiler/rustc_mir_build/src/build/custom

1 file changed

+5
-1
lines changed

compiler/rustc_mir_build/src/build/custom/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ fn parse_attribute(attr: &Attribute) -> MirPhase {
118118
phase = Some(value);
119119
}
120120
other => {
121-
panic!("Unexpected key {}", other);
121+
span_bug!(
122+
nested.span(),
123+
"Unexpected key while parsing custom_mir attribute: '{}'",
124+
other
125+
);
122126
}
123127
}
124128
}

0 commit comments

Comments
 (0)