diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2021-12-01 00:28:08 +0000 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2021-12-01 00:28:08 +0000 |
commit | f1e357ce52bce0bca1c39db37e3be62d09e48436 (patch) | |
tree | 9beb0b150fbff638772035c74ab8c2e526406613 /src | |
parent | be09a1fabf34e4d5dc81366144230eb243abe790 (diff) | |
download | mlua-f1e357ce52bce0bca1c39db37e3be62d09e48436.zip |
Hide (doc) into_static/from_static methods
Diffstat (limited to 'src')
-rw-r--r-- | src/lua.rs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -689,6 +689,7 @@ impl Lua { /// This `Lua` object can then be dropped which will properly release the allocated memory. /// /// [`Lua::from_static`]: #method.from_static + #[doc(hidden)] pub fn into_static(self) -> &'static Self { Box::leak(Box::new(self)) } @@ -697,6 +698,7 @@ impl Lua { /// /// # Safety /// This function is unsafe because improper use may lead to memory problems or undefined behavior. + #[doc(hidden)] pub unsafe fn from_static(lua: &'static Lua) -> Self { *Box::from_raw(lua as *const Lua as *mut Lua) } |