mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
12 lines
555 B
Plaintext
12 lines
555 B
Plaintext
error: lifetime may not live long enough
|
|
--> tests/compile/async_nonstatic_userdata.rs:9:13
|
|
|
|
|
7 | impl UserData for MyUserData<'_> {
|
|
| -- lifetime `'1` appears in the `impl`'s self type
|
|
8 | fn add_methods<M: UserDataMethods<Self>>(methods: &mut M) {
|
|
9 | / methods.add_async_method("print", |_, data, ()| async move {
|
|
10 | | println!("{}", data.0);
|
|
11 | | Ok(())
|
|
12 | | });
|
|
| |______________^ requires that `'1` must outlive `'static`
|