mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
functions in structs, in general
This commit is contained in:
parent
b7119e9b3a
commit
9a6f9ad26e
7 changed files with 42 additions and 13 deletions
|
@ -387,7 +387,28 @@ impl<'a> Copy for InLayout<'a> {}
|
|||
|
||||
impl std::fmt::Debug for InLayout<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_tuple("InLayout").field(&self.0).finish()
|
||||
match *self {
|
||||
Layout::VOID => f.write_str("InLayout(VOID)"),
|
||||
Layout::UNIT => f.write_str("InLayout(UNIT)"),
|
||||
Layout::BOOL => f.write_str("InLayout(BOOL)"),
|
||||
Layout::U8 => f.write_str("InLayout(U8)"),
|
||||
Layout::U16 => f.write_str("InLayout(U16)"),
|
||||
Layout::U32 => f.write_str("InLayout(U32)"),
|
||||
Layout::U64 => f.write_str("InLayout(U64)"),
|
||||
Layout::U128 => f.write_str("InLayout(U128)"),
|
||||
Layout::I8 => f.write_str("InLayout(I8)"),
|
||||
Layout::I16 => f.write_str("InLayout(I16)"),
|
||||
Layout::I32 => f.write_str("InLayout(I32)"),
|
||||
Layout::I64 => f.write_str("InLayout(I64)"),
|
||||
Layout::I128 => f.write_str("InLayout(I128)"),
|
||||
Layout::F32 => f.write_str("InLayout(F32)"),
|
||||
Layout::F64 => f.write_str("InLayout(F64)"),
|
||||
Layout::DEC => f.write_str("InLayout(DEC)"),
|
||||
Layout::STR => f.write_str("InLayout(STR)"),
|
||||
Layout::OPAQUE_PTR => f.write_str("InLayout(OPAQUE_PTR)"),
|
||||
Layout::NAKED_RECURSIVE_PTR => f.write_str("InLayout(NAKED_RECURSIVE_PTR)"),
|
||||
_ => f.debug_tuple("InLayout").field(&self.0).finish(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue