46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
|
error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
|
||
|
--> $DIR/scope_callback_inner.rs:12:14
|
||
|
|
|
||
|
12 | .create_function_mut(|_, t: Table| {
|
||
|
| ^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 9:15...
|
||
|
--> $DIR/scope_callback_inner.rs:9:15
|
||
|
|
|
||
|
9 | lua.scope(|scope| -> Result<()> {
|
||
|
| _______________^
|
||
|
10 | | let mut inner: Option<Table> = None;
|
||
|
11 | | let f = scope
|
||
|
12 | | .create_function_mut(|_, t: Table| {
|
||
|
... |
|
||
|
17 | | Ok(())
|
||
|
18 | | });
|
||
|
| |_____^
|
||
|
note: ...so that reference does not outlive borrowed content
|
||
|
--> $DIR/scope_callback_inner.rs:11:17
|
||
|
|
|
||
|
11 | let f = scope
|
||
|
| ^^^^^
|
||
|
note: but, the lifetime must be valid for the method call at 9:5...
|
||
|
--> $DIR/scope_callback_inner.rs:9:5
|
||
|
|
|
||
|
9 | / lua.scope(|scope| -> Result<()> {
|
||
|
10 | | let mut inner: Option<Table> = None;
|
||
|
11 | | let f = scope
|
||
|
12 | | .create_function_mut(|_, t: Table| {
|
||
|
... |
|
||
|
17 | | Ok(())
|
||
|
18 | | });
|
||
|
| |______^
|
||
|
note: ...so that a type/lifetime parameter is in scope here
|
||
|
--> $DIR/scope_callback_inner.rs:9:5
|
||
|
|
|
||
|
9 | / lua.scope(|scope| -> Result<()> {
|
||
|
10 | | let mut inner: Option<Table> = None;
|
||
|
11 | | let f = scope
|
||
|
12 | | .create_function_mut(|_, t: Table| {
|
||
|
... |
|
||
|
17 | | Ok(())
|
||
|
18 | | });
|
||
|
| |______^
|