MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / const_ptrcast

Method const_ptrcast

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs:358–367  ·  view source on GitHub ↗
(&self, val: Self::Value, ty: Self::Type)

Source from the content-addressed store, hash-verified

356 }
357
358 fn const_ptrcast(&self, val: Self::Value, ty: Self::Type) -> Self::Value {
359 if val.ty == ty {
360 val
361 } else {
362 // constant ptrcast is not supported in spir-v
363 let result = val.def_cx(self).with_type(ty);
364 self.zombie_no_span(result.def_cx(self), "const_ptrcast");
365 result
366 }
367 }
368}
369
370impl<'tcx> CodegenCx<'tcx> {

Callers

nothing calls this directly

Calls 3

with_typeMethod · 0.80
def_cxMethod · 0.80
zombie_no_spanMethod · 0.80

Tested by

no test coverage detected