Skip to main content

const_operand_bytes

Function const_operand_bytes 

Source
pub fn const_operand_bytes<'tcx>(
    tcx: TyCtxt<'tcx>,
    operand: &Operand<'tcx>,
) -> Option<Vec<u8>>
Expand description

Try to extract raw bytes from a MIR constant operand that is a reference to a byte array/slice (e.g. b"hello\0"). Returns the byte values. Used by the VM to populate byte-level tracking for constant C strings.