diff --git a/src/lib/unsafe.rs b/src/lib/unsafe.rs index 11909034820..41aa02b8c9d 100644 --- a/src/lib/unsafe.rs +++ b/src/lib/unsafe.rs @@ -4,7 +4,7 @@ native "rust-intrinsic" mod rusti { fn cast<T, U>(src: T) -> U; } -native "rust" mod rustrt { +native "c-stack-cdecl" mod rustrt { fn leak<@T>(-thing: T); } diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index bfd2b046ca6..83d697ba0ba 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -86,7 +86,7 @@ align_of(type_desc *t) { } extern "C" CDECL void -leak(type_desc *t, void *thing) { +leak(void *thing) { // Do nothing. Call this with move-mode in order to say "Don't worry rust, // I'll take care of this." }