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

use core::fmt::Write;

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

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

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