(
&self,
layout: TyAndLayout<'tcx>,
alloc: ConstAllocation<'tcx>,
offset: Size,
)
| 343 | undef |
| 344 | } |
| 345 | fn from_const_alloc( |
| 346 | &self, |
| 347 | layout: TyAndLayout<'tcx>, |
| 348 | alloc: ConstAllocation<'tcx>, |
| 349 | offset: Size, |
| 350 | ) -> PlaceRef<'tcx, Self::Value> { |
| 351 | assert_eq!(offset, Size::ZERO); |
| 352 | let ty = layout.spirv_type(DUMMY_SP, self); |
| 353 | let init = self.create_const_alloc(alloc, ty); |
| 354 | let result = self.static_addr_of(init, alloc.inner().align, None); |
| 355 | PlaceRef::new_sized(result, layout) |
| 356 | } |
| 357 | |
| 358 | fn const_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value { |
| 359 | if val.ty == ty { |
nothing calls this directly
no test coverage detected