Skip to content

Commit 3d43103

Browse files
committed
Make __idiv metamethod available for luau
Closes #383
1 parent 5a22437 commit 3d43103

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/userdata.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ pub enum MetaMethod {
5454
/// The unary minus (`-`) operator.
5555
Unm,
5656
/// The floor division (//) operator.
57-
/// Requires `feature = "lua54/lua53"`
58-
#[cfg(any(feature = "lua54", feature = "lua53"))]
57+
/// Requires `feature = "lua54/lua53/luau"`
58+
#[cfg(any(feature = "lua54", feature = "lua53", feature = "luau"))]
5959
IDiv,
6060
/// The bitwise AND (&) operator.
6161
/// Requires `feature = "lua54/lua53"`
@@ -180,7 +180,7 @@ impl MetaMethod {
180180
MetaMethod::Pow => "__pow",
181181
MetaMethod::Unm => "__unm",
182182

183-
#[cfg(any(feature = "lua54", feature = "lua53"))]
183+
#[cfg(any(feature = "lua54", feature = "lua53", feature = "luau"))]
184184
MetaMethod::IDiv => "__idiv",
185185
#[cfg(any(feature = "lua54", feature = "lua53"))]
186186
MetaMethod::BAnd => "__band",

src/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ pub unsafe fn init_error_registry(state: *mut ffi::lua_State) -> Result<()> {
928928
"__mod",
929929
"__pow",
930930
"__unm",
931-
#[cfg(any(feature = "lua54", feature = "lua53"))]
931+
#[cfg(any(feature = "lua54", feature = "lua53", feature = "luau"))]
932932
"__idiv",
933933
#[cfg(any(feature = "lua54", feature = "lua53"))]
934934
"__band",

0 commit comments

Comments
 (0)