mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-03 06:02:54 +00:00
chore: replace panic! with internal_error!
This commit is contained in:
parent
b3ab54ac90
commit
c39103d6d0
8 changed files with 45 additions and 27 deletions
|
|
@ -11,3 +11,4 @@ roc_collections = {path = "../collections"}
|
|||
roc_module = {path = "../module"}
|
||||
roc_mono = {path = "../mono"}
|
||||
roc_debug_flags = {path = "../debug_flags"}
|
||||
roc_error_macros = { path = "../../error_macros" }
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ use roc_mono::layout::{
|
|||
Builtin, CapturesNiche, Layout, RawFunctionLayout, STLayoutInterner, UnionLayout,
|
||||
};
|
||||
|
||||
use roc_error_macros::internal_error;
|
||||
|
||||
// just using one module for now
|
||||
pub const MOD_APP: ModName = ModName(b"UserApp");
|
||||
|
||||
|
|
@ -603,9 +605,10 @@ fn build_tuple_value(
|
|||
|
||||
for field in symbols.iter() {
|
||||
let value_id = match env.symbols.get(field) {
|
||||
None => panic!(
|
||||
None => internal_error!(
|
||||
"Symbol {:?} is not defined in environment {:?}",
|
||||
field, &env.symbols
|
||||
field,
|
||||
&env.symbols
|
||||
),
|
||||
Some(x) => *x,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue