summaryrefslogtreecommitdiffstats
path: root/library/backtrace/crates/dylib-dep
diff options
context:
space:
mode:
Diffstat (limited to 'library/backtrace/crates/dylib-dep')
-rw-r--r--library/backtrace/crates/dylib-dep/Cargo.toml10
-rw-r--r--library/backtrace/crates/dylib-dep/src/lib.rs14
2 files changed, 24 insertions, 0 deletions
diff --git a/library/backtrace/crates/dylib-dep/Cargo.toml b/library/backtrace/crates/dylib-dep/Cargo.toml
new file mode 100644
index 000000000..c3d4a8c2f
--- /dev/null
+++ b/library/backtrace/crates/dylib-dep/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "dylib-dep"
+version = "0.1.0"
+edition = "2018"
+authors = []
+publish = false
+
+[lib]
+name = "dylib_dep"
+crate-type = ["cdylib", "rlib"]
diff --git a/library/backtrace/crates/dylib-dep/src/lib.rs b/library/backtrace/crates/dylib-dep/src/lib.rs
new file mode 100644
index 000000000..201807797
--- /dev/null
+++ b/library/backtrace/crates/dylib-dep/src/lib.rs
@@ -0,0 +1,14 @@
+#![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!());
+}