diff --git a/compiler/gen/src/crane/convert.rs b/compiler/gen/src/crane/convert.rs index 857cbdf8f9..849ab38eb0 100644 --- a/compiler/gen/src/crane/convert.rs +++ b/compiler/gen/src/crane/convert.rs @@ -10,7 +10,7 @@ pub fn type_from_layout(cfg: TargetFrontendConfig, layout: &Layout<'_>) -> Type use roc_mono::layout::Layout::*; match layout { - Pointer(_) | FunctionPointer(_, _) | Struct(_) | Tag(_) => cfg.pointer_type(), + FunctionPointer(_, _) | Struct(_) | Tag(_) => cfg.pointer_type(), Builtin(builtin) => match builtin { Int64 => types::I64, Float64 => types::F64, diff --git a/compiler/gen/src/llvm/convert.rs b/compiler/gen/src/llvm/convert.rs index 2c8c16dd6e..b4d4ce2ea0 100644 --- a/compiler/gen/src/llvm/convert.rs +++ b/compiler/gen/src/llvm/convert.rs @@ -71,9 +71,6 @@ pub fn basic_type_from_layout<'ctx>( Tag(_fields) => { panic!("TODO layout_to_basic_type for Tag"); } - Pointer(_layout) => { - panic!("TODO layout_to_basic_type for Pointer"); - } Builtin(builtin) => match builtin { Int64 => context.i64_type().as_basic_type_enum(), Float64 => context.f64_type().as_basic_type_enum(), diff --git a/compiler/mono/src/layout.rs b/compiler/mono/src/layout.rs index 2a7c716e32..1404a55e04 100644 --- a/compiler/mono/src/layout.rs +++ b/compiler/mono/src/layout.rs @@ -11,7 +11,6 @@ pub enum Layout<'a> { Builtin(Builtin<'a>), Struct(&'a [(Lowercase, Layout<'a>)]), Tag(&'a [Layout<'a>]), - Pointer(&'a Layout<'a>), /// A function. The types of its arguments, then the type of its return value. FunctionPointer(&'a [Layout<'a>], &'a Layout<'a>), } @@ -103,7 +102,7 @@ impl<'a> Layout<'a> { sum } - Pointer(_) | FunctionPointer(_, _) => pointer_size, + FunctionPointer(_, _) => pointer_size, } } }