luau 0.732.0

Safe lifetime-bound Rust embedding API for the Luau runtime
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[test]
fn lifetime_guarantees() {
    let tests = trybuild::TestCases::new();
    tests.compile_fail("tests/compile/handle_outlives_lua.rs");
    tests.compile_fail("tests/compile/callback_value_escapes.rs");
    tests.compile_fail("tests/compile/sandboxed_function_outlives_owner.rs");
    tests.compile_fail("tests/compile/scoped_function_escapes.rs");
}

#[cfg(feature = "macros")]
#[test]
fn macro_contracts() {
    let tests = trybuild::TestCases::new();
    tests.compile_fail("tests/compile/userdata_generic.rs");
    tests.compile_fail("tests/compile/userdata_invalid_getter.rs");
    tests.compile_fail("tests/compile/chunk_dollar_non_ident.rs");
}