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

Commit c6e6ceb

Browse files
committed
make custom mir ICE a bit nicer
1 parent 0d03812 commit c6e6ceb

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)