mlua 0.2.0

High level bindings to Lua 5.1/5.2/5.3 (including LuaJIT) with support of writing native lua modules in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
error[E0597]: `ibad` does not live long enough
  --> $DIR/scope_userdata_borrow.rs:16:56
   |
12 |     lua.scope(|scope| -> Result<()> {
   |                ----- has type `&mlua::scope::Scope<'_, '1>`
...
16 |             scope.create_nonstatic_userdata(MyUserData(&ibad))?;
   |             -------------------------------------------^^^^^--
   |             |                                          |
   |             |                                          borrowed value does not live long enough
   |             argument requires that `ibad` is borrowed for `'1`
17 |         };
   |         - `ibad` dropped here while still borrowed