]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/backtrace/bad-backtrace-decl.rs
b9f1c779ae23277377acab99fc60946b989e6618
[rust.git] / tests / compile-fail / backtrace / bad-backtrace-decl.rs
1 extern "Rust" {
2     fn miri_get_backtrace(flags: u64) -> Box<[*mut ()]>;
3     fn miri_resolve_frame(ptr: *mut (), flags: u64);
4 }
5
6 fn main() {
7     let frames = unsafe { miri_get_backtrace(0) };
8     for frame in frames.into_iter() {
9         unsafe {
10             miri_resolve_frame(*frame, 0); //~ ERROR Undefined Behavior: bad declaration of miri_resolve_frame - should return a struct with 4 fields
11         }
12     }
13 }