Fix alloc_base_addr type

This commit is contained in:
Rune Tynan 2023-02-13 23:19:34 -05:00
parent b2455dc91c
commit f1f40ac05c
No known key found for this signature in database
GPG key ID: 7ECC932F8B2C731E

View file

@ -533,7 +533,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
/// It is up to the caller to take sufficient care when using this address:
/// there could be provenance or uninit memory in there, and other memory
/// accesses could invalidate the exposed pointer.
pub fn alloc_base_addr(&self, id: AllocId) -> InterpResult<'tcx, *const ()> {
pub fn alloc_base_addr(&self, id: AllocId) -> InterpResult<'tcx, *const u8> {
let alloc = self.get_alloc_raw(id)?;
Ok(alloc.base_addr())
}