add const_make_global; err for const_allocate ptrs if didn't call

Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Oli Scherer <github333195615777966@oli-obk.de>
This commit is contained in:
Deadbeef
2025-07-08 00:20:57 +08:00
parent 9c3064e131
commit 3f2dc2bd1a
31 changed files with 361 additions and 30 deletions

View File

@@ -422,6 +422,9 @@ pub(crate) fn check_intrinsic_type(
vec![Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize, tcx.types.usize],
tcx.types.unit,
),
sym::const_make_global => {
(0, 0, vec![Ty::new_mut_ptr(tcx, tcx.types.u8)], Ty::new_imm_ptr(tcx, tcx.types.u8))
}
sym::ptr_offset_from => (
1,