summaryrefslogtreecommitdiff
path: root/src/thread.rs
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2022-04-03 03:12:37 +0100
committerAlex Orlenko <zxteam@protonmail.com>2022-04-03 22:13:54 +0100
commit0ea65a29850bb9bd99808f7246db0a76ae024849 (patch)
treeeffca1c9ac95762ce25b0c9c77e0e81e1365c122 /src/thread.rs
parent8c333354d39e0a1739828ac68717f7ca8ffbee7f (diff)
downloadmlua-0ea65a29850bb9bd99808f7246db0a76ae024849.zip
Fix doc test
Diffstat (limited to 'src/thread.rs')
-rw-r--r--src/thread.rs8
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"`