diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2022-04-03 03:12:37 +0100 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2022-04-03 22:13:54 +0100 |
commit | 0ea65a29850bb9bd99808f7246db0a76ae024849 (patch) | |
tree | effca1c9ac95762ce25b0c9c77e0e81e1365c122 /src/thread.rs | |
parent | 8c333354d39e0a1739828ac68717f7ca8ffbee7f (diff) | |
download | mlua-0ea65a29850bb9bd99808f7246db0a76ae024849.zip |
Fix doc test
Diffstat (limited to 'src/thread.rs')
-rw-r--r-- | src/thread.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/thread.rs b/src/thread.rs index d710c92..b478ba4 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -299,8 +299,9 @@ impl<'lua> Thread<'lua> { /// # Examples /// /// ``` - /// # use mlua::{Lua, Result}; - /// # fn main() -> Result<()> { + /// # #[cfg(feature = "luau")] + /// # fn main() -> mlua::Result<()> { + /// use mlua::Lua; /// let lua = Lua::new(); /// let thread = lua.create_thread(lua.create_function(|lua2, ()| { /// lua2.load("var = 123").exec()?; @@ -314,6 +315,9 @@ impl<'lua> Thread<'lua> { /// assert_eq!(lua.globals().get::<_, Option<u32>>("var")?, None); /// # Ok(()) /// # } + /// + /// # #[cfg(not(feature = "luau"))] + /// fn main() {} /// ``` /// /// Requires `feature = "luau"` |