pub fn read_str(&self, mplace: &MPlaceTy<'tcx, M::PointerTag>) -> InterpResult<'tcx, &str> {
        let len = mplace.len(self)?;
        let bytes = self.memory.read_bytes(mplace.ptr, Size::from_bytes(len))?;
        let str = std::str::from_utf8(bytes).map_err(|err| err_ub!(InvalidStr(err)))?;
        Ok(str)
    }
// Turn the wide MPlace into a string (must already be dereferenced!)
Turn the wide MPlace into a string (must already be dereferenced!)
Turn the wide MPlace into a string ( must already be dereferenced! )
pub fn read_str(&self, mplace: &MPlaceTy<'tcx, M::PointerTag>) -> InterpResult<'tcx, &str> {
        let len = mplace.len(self)?;
        let bytes = self.memory.read_bytes(mplace.ptr, Size::from_bytes(len))?;
        let str = std::str::from_utf8(bytes).map_err(|err| err_ub!(InvalidStr(err)))?;
        Ok(str)
    }
pub fn read_str ( & self , mplace : & MPlaceTy < ' tcx , M :: PointerTag > ) -> InterpResult < ' tcx , & str > { let len = mplace . len ( self ) ? ; let bytes = self . memory . read_bytes ( mplace . ptr , Size :: from_bytes ( len ) ) ? ; let str = std :: str :: from_utf8 ( bytes ) . map_err ( | err | err_ub ! ( InvalidStr ( err ) ) ) ? ; Ok ( str ) }
Turn the wide MPlace into a string (must already be dereferenced!)
Turn the wide MPlace into a string ( must already be dereferenced! )
&self
mplace
&MPlaceTy<'tcx, M::PointerTag>
&self
mplace
&MPlaceTy<'tcx, M::PointerTag>