rust/tests/pass/backtrace/backtrace-global-alloc.rs
2022-08-06 15:29:43 -04:00

15 lines
273 B
Rust

//@compile-flags: -Zmiri-disable-isolation
//@rustc-env: RUST_BACKTRACE=1
#![feature(backtrace)]
use std::alloc::System;
use std::backtrace::Backtrace;
#[global_allocator]
static GLOBAL_ALLOCATOR: System = System;
fn main() {
eprint!("{}", Backtrace::capture());
}