main: make assert_no_alloc actually assert

This commit is contained in:
Edward Amsden 2023-09-01 10:43:24 -05:00
parent c26fd83e27
commit 0f6d574526

View File

@ -13,6 +13,12 @@ use std::mem;
use std::ptr::copy_nonoverlapping;
use std::ptr::write_bytes;
use assert_no_alloc::*;
#[cfg(debug_assertions)] // required when disable_release is set (default)
#[global_allocator]
static A: AllocDisabler = AllocDisabler;
fn main() -> io::Result<()> {
let filename = env::args().nth(1).expect("Must provide input filename");