diff options
Diffstat (limited to 'tests/ui/backtrace/auxiliary/dylib-dep-helper.rs')
| -rw-r--r-- | tests/ui/backtrace/auxiliary/dylib-dep-helper.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/backtrace/auxiliary/dylib-dep-helper.rs b/tests/ui/backtrace/auxiliary/dylib-dep-helper.rs new file mode 100644 index 00000000000..565d8b65de0 --- /dev/null +++ b/tests/ui/backtrace/auxiliary/dylib-dep-helper.rs @@ -0,0 +1,19 @@ +//@ compile-flags: -g -Cstrip=none -Cforce-frame-pointers=yes + +#![crate_type = "cdylib"] +#![crate_type = "rlib"] + +#![allow(improper_ctypes_definitions)] + +type Pos = (&'static str, u32); + +macro_rules! pos { + () => { + (file!(), line!()) + }; +} + +#[no_mangle] +pub extern "C" fn foo(outer: Pos, inner: fn(Pos, Pos)) { + inner(outer, pos!()); +} |
