about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/miri_start_wrong_sig.rs
blob: dac83d817ba49b214e9bbcd627ecaaae4386f5bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@compile-flags: -Cpanic=abort
//@error-in-other-file: `miri_start` must have the following signature:
#![no_main]
#![no_std]

use core::fmt::Write;

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

#[no_mangle]
fn miri_start() -> isize {
    //~^ ERROR: mismatched types
    writeln!(utils::MiriStdout, "Hello from miri_start!").unwrap();
    0
}

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