Use internal_error over unreachable

This commit is contained in:
Richard Feldman 2022-05-11 10:51:27 -04:00
parent 49bf36ec09
commit b9c07aef27
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798

View file

@ -629,6 +629,7 @@ fn deep_copy_type_vars<'a>(
mod test { mod test {
use super::deep_copy_type_vars; use super::deep_copy_type_vars;
use bumpalo::Bump; use bumpalo::Bump;
use roc_error_macros::internal_error;
use roc_module::symbol::Symbol; use roc_module::symbol::Symbol;
use roc_types::subs::{ use roc_types::subs::{
Content, Content::*, Descriptor, Mark, OptVariable, Rank, Subs, SubsIndex, Variable, Content, Content::*, Descriptor, Mark, OptVariable, Rank, Subs, SubsIndex, Variable,
@ -732,7 +733,7 @@ mod test {
RigidAbleVar(name, Symbol::UNDERSCORE) => { RigidAbleVar(name, Symbol::UNDERSCORE) => {
assert_eq!(subs[*name].as_str(), "a"); assert_eq!(subs[*name].as_str(), "a");
} }
it => unreachable!("{:?}", it), it => internal_error!("{:?}", it),
} }
} }
} }