summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lua.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua.rs b/src/lua.rs
index a7bf385..a878638 100644
--- a/src/lua.rs
+++ b/src/lua.rs
@@ -33,6 +33,7 @@ pub struct Lua {
pub struct Scope<'scope> {
lua: &'scope Lua,
destructors: RefCell<Vec<Box<FnMut(*mut ffi::lua_State) -> Box<Any>>>>,
+ _phantom: PhantomData<RefCell<&'scope ()>>,
}
// Data associated with the main lua_State via lua_getextraspace.
@@ -326,6 +327,7 @@ impl Lua {
let mut scope = Scope {
lua: self,
destructors: RefCell::new(Vec::new()),
+ _phantom: PhantomData,
};
let r = f(&mut scope);
drop(scope);