mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Remove all box references
This commit is contained in:
parent
b5db3f68e1
commit
a8d821bf87
9 changed files with 39 additions and 148 deletions
|
@ -1,5 +1,7 @@
|
|||
use roc_target::TargetInfo;
|
||||
|
||||
use super::{InLayout, LayoutRepr};
|
||||
|
||||
/// The layout of an erasure.
|
||||
///
|
||||
/// A type-erased value consists of three fields at runtime:
|
||||
|
@ -53,3 +55,12 @@ impl Erased {
|
|||
alloc.text("?Erased")
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> LayoutRepr<'a> {
|
||||
pub fn boxed_erased_value(value: &'a InLayout<'a>) -> Self {
|
||||
Self::Union(super::UnionLayout::NullableUnwrapped {
|
||||
nullable_id: true,
|
||||
other_fields: std::slice::from_ref(value),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue