summaryrefslogtreecommitdiffstats
path: root/src/test/run-make/wasm-symbols-not-imported/foo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-make/wasm-symbols-not-imported/foo.rs')
-rw-r--r--src/test/run-make/wasm-symbols-not-imported/foo.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/run-make/wasm-symbols-not-imported/foo.rs b/src/test/run-make/wasm-symbols-not-imported/foo.rs
new file mode 100644
index 000000000..b25bdc980
--- /dev/null
+++ b/src/test/run-make/wasm-symbols-not-imported/foo.rs
@@ -0,0 +1,14 @@
+#![crate_type = "cdylib"]
+#![no_std]
+
+use core::panic::PanicInfo;
+
+#[no_mangle]
+pub extern fn foo() {
+ panic!()
+}
+
+#[panic_handler]
+fn panic(_info: &PanicInfo) -> ! {
+ loop {}
+}