tsuki 0.4.8

Lua 5.4 ported to Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local ok = false
local mt = {
  __close = function (obj, err)
    assert(type(obj) == 'table')
    assert(type(err) == 'nil')
    ok = true
  end
}

local function foo()
  local bar <close> = setmetatable({}, mt)
end

foo()
assert(ok)