1
0
mirror of https://github.com/bspeice/qadapt synced 2025-07-01 05:46:16 -04:00

Fix conditional compilation guards

This commit is contained in:
2018-11-18 21:29:32 -05:00
parent 79f57ba2f9
commit 5d7be8e18e
6 changed files with 101 additions and 62 deletions

19
examples/release_mode.rs Normal file
View File

@ -0,0 +1,19 @@
extern crate qadapt;
use qadapt::allocate_panic;
use qadapt::QADAPT;
#[global_allocator]
static Q: QADAPT = QADAPT;
#[allocate_panic]
fn does_allocate() -> Box<u8> {
Box::new(0)
}
fn main() {
// If you were to run `cargo run --example release_mode`, this program blows up.
// If, however, you ran `cargo run --release --example release_mode`,
// nothing interesting will happen.
does_allocate();
}