Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a40ff56

Browse files
committed
Add i16 and u16 primitive layout.
1 parent b7d032c commit a40ff56

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/machine.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ pub struct AllocExtra {
178178
pub struct PrimitiveLayouts<'tcx> {
179179
pub unit: TyAndLayout<'tcx>,
180180
pub i8: TyAndLayout<'tcx>,
181+
pub i16: TyAndLayout<'tcx>,
181182
pub i32: TyAndLayout<'tcx>,
182183
pub isize: TyAndLayout<'tcx>,
183184
pub u8: TyAndLayout<'tcx>,
185+
pub u16: TyAndLayout<'tcx>,
184186
pub u32: TyAndLayout<'tcx>,
185187
pub usize: TyAndLayout<'tcx>,
186188
pub bool: TyAndLayout<'tcx>,
@@ -194,9 +196,11 @@ impl<'mir, 'tcx: 'mir> PrimitiveLayouts<'tcx> {
194196
Ok(Self {
195197
unit: layout_cx.layout_of(tcx.mk_unit())?,
196198
i8: layout_cx.layout_of(tcx.types.i8)?,
199+
i16: layout_cx.layout_of(tcx.types.i16)?,
197200
i32: layout_cx.layout_of(tcx.types.i32)?,
198201
isize: layout_cx.layout_of(tcx.types.isize)?,
199202
u8: layout_cx.layout_of(tcx.types.u8)?,
203+
u16: layout_cx.layout_of(tcx.types.u16)?,
200204
u32: layout_cx.layout_of(tcx.types.u32)?,
201205
usize: layout_cx.layout_of(tcx.types.usize)?,
202206
bool: layout_cx.layout_of(tcx.types.bool)?,

0 commit comments

Comments
 (0)