Skip to content

Commit c292500

Browse files
committed
Do not panic on ICE
1 parent 7716569 commit c292500

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/error/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@ impl Display for DiagnosticKind {
339339
write!(f, "Expected `resume` to have effects {expected}, but found {actual}")
340340
},
341341
DiagnosticKind::TypeError(TypeErrorKind::NeverShown, actual, expected) => {
342-
unreachable!("This type error should never be shown. Expected {}, Actual {}", expected, actual)
342+
write!(f, "(ICE - This type error should never be shown): Expected {}, Actual {}", expected, actual)
343343
},
344344
DiagnosticKind::TypeError(TypeErrorKind::MonomorphizationError, actual, expected) => {
345-
unreachable!(
346-
"Unification error during monomorphization: Could not unify definition {} with instantiation {}",
345+
write!(f,
346+
"(ICE - Unification error during monomorphization): Could not unify definition {} with instantiation {}",
347347
expected, actual
348348
)
349349
},

0 commit comments

Comments
 (0)