summaryrefslogtreecommitdiff
path: root/tests/compile-fail/ref_not_unwindsafe.rs
blob: 6d87aae7ccd492df896ddd4f88171914f62af3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
extern crate rlua;

use std::panic::catch_unwind;

use rlua::Lua;

fn main() {
    let lua = Lua::new();
    let table = lua.create_table().unwrap();
    let _ = catch_unwind(move || table.set("a", "b").unwrap());
    //~^ error: the type `std::cell::UnsafeCell<()>` may contain interior mutability and a reference
    // may not be safely transferrable across a catch_unwind boundary
}