about summary refs log tree commit diff
path: root/src/tools/miri/tests/pass/no_std_miri_start.rs
blob: cf9636b9d8c2c1ed16103412c01d33ea2f45f06f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@compile-flags: -Cpanic=abort
#![no_std]
#![no_main]

use core::fmt::Write;

#[path = "../utils/mod.no_std.rs"]
mod utils;

#[no_mangle]
fn miri_start(_argc: isize, _argv: *const *const u8) -> isize {
    writeln!(utils::MiriStdout, "hello, world!").unwrap();
    0
}

#[panic_handler]
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
    loop {}
}