Skip to content

Commit

Permalink
replace unreachable! with internal_error! in expr canonicalization
Browse files Browse the repository at this point in the history
  • Loading branch information
mulias committed Nov 26, 2023
1 parent 69b7286 commit d53788b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/compiler/can/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,10 +1062,10 @@ pub fn canonicalize_expr<'a>(
})
}
ast::Expr::RecordBuilder(_) => {
unreachable!("RecordBuilder should have been desugared by now")
internal_error!("RecordBuilder should have been desugared by now")
}
ast::Expr::Backpassing(_, _, _) => {
unreachable!("Backpassing should have been desugared by now")
internal_error!("Backpassing should have been desugared by now")
}
ast::Expr::Closure(loc_arg_patterns, loc_body_expr) => {
let (closure_data, output) =
Expand Down Expand Up @@ -2338,10 +2338,10 @@ pub fn inline_calls(var_store: &mut VarStore, expr: Expr) -> Expr {
loc_answer.value
}
Some(_) => {
unreachable!("Tried to inline a non-function");
internal_error!("Tried to inline a non-function");
}
None => {
unreachable!(
internal_error!(
"Tried to inline a builtin that wasn't registered: {:?}",
symbol
);
Expand Down

0 comments on commit d53788b

Please sign in to comment.