File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use rlua::Lua;
7
7
fn main ( ) {
8
8
Lua :: new ( ) . context ( |lua| {
9
9
catch_unwind ( move || {
10
- //~^ error: the type `std::cell:: UnsafeCell<()>` may contain interior mutability and a reference
10
+ //~^ error: the type `UnsafeCell<()>` may contain interior mutability and a reference
11
11
// may not be safely transferrable across a catch_unwind boundary
12
12
lua. create_table ( ) . unwrap ( ) ;
13
13
} ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use rlua::Lua;
7
7
fn main ( ) {
8
8
let lua = Lua :: new ( ) ;
9
9
catch_unwind ( || {
10
- //~^ error: the type `std::cell:: UnsafeCell<()>` may contain interior mutability and a reference
10
+ //~^ error: the type `UnsafeCell<()>` may contain interior mutability and a reference
11
11
// may not be safely transferrable across a catch_unwind boundary
12
12
lua. context ( |lua| {
13
13
lua. create_table ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ fn main() {
11
11
lua. scope ( |scope| {
12
12
let mut inner: Option < Table > = None ;
13
13
let f = scope
14
+ //~^ error: borrowed data escapes outside of closure
14
15
. create_function_mut ( move |lua, t : Table | {
15
- //~^ error: cannot infer an appropriate lifetime for autoref due to conflicting
16
- // requirements
17
16
if let Some ( old) = inner. take ( ) {
18
17
// Access old callback `Lua`.
19
18
}
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ fn main() {
11
11
lua. scope ( |scope| {
12
12
let mut inner: Option < Table > = None ;
13
13
let f = scope
14
+ //~^ error: borrowed data escapes outside of closure
14
15
. create_function_mut ( |_, t : Table | {
15
- //~^ error: cannot infer an appropriate lifetime for autoref due to conflicting
16
- // requirements
16
+ //~^ error: closure may outlive the current function, but it borrows `inner`
17
17
inner = Some ( t) ;
18
18
Ok ( ( ) )
19
19
} )
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ fn main() {
11
11
let mut outer: Option < Table > = None ;
12
12
lua. scope ( |scope| {
13
13
let f = scope
14
+ //~^ error: borrowed data escapes outside of closure
14
15
. create_function_mut ( |_, t : Table | {
15
- //~^^ error: borrowed data cannot be stored outside of its closure
16
16
outer = Some ( t) ;
17
+ //~^ error: `outer` does not live long enough
17
18
Ok ( ( ) )
18
19
} )
19
20
. unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ fn test_user_data() {
10
10
struct UserData1 ( i64 ) ;
11
11
struct UserData2 ( Box < i64 > ) ;
12
12
13
- impl UserData for UserData1 { } ;
14
- impl UserData for UserData2 { } ;
13
+ impl UserData for UserData1 { }
14
+ impl UserData for UserData2 { }
15
15
16
16
Lua :: new ( ) . context ( |lua| {
17
17
let userdata1 = lua. create_userdata ( UserData1 ( 1 ) ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments