You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some trivially valid examples are currently impossible due to lifetime annotations:
// This works fine
let mut i = 0;
lua.scope(|scope| {
scope.create_any_userdata_ref_mut(&mut i);
});
// This fails because the type must be 'static
struct Wrapper<'a>(&'a mut i32);
let mut w = Wrapper(&mut i);
lua.scope(|scope| {
scope.create_any_userdata_ref_mut(&mut w)
});
scope.create_any_userdata_ref_mut should not require T: 'static. The only workaround I've found is to transmute the parameter.
The text was updated successfully, but these errors were encountered:
Some trivially valid examples are currently impossible due to lifetime annotations:
scope.create_any_userdata_ref_mut
should not requireT: 'static
. The only workaround I've found is to transmute the parameter.The text was updated successfully, but these errors were encountered: