diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2023-06-15 00:34:41 +0100 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2023-06-15 00:34:41 +0100 |
commit | 9fdba541e983ddee34c602863df64fd3fe9f26bf (patch) | |
tree | 9299f07c634a14dd52392802b85c59ae417bf39d /tests/compile/async_nonstatic_userdata.stderr | |
parent | cf0524aa23603a5c366d7905ba7c1fac45ee093b (diff) | |
download | mlua-9fdba541e983ddee34c602863df64fd3fe9f26bf.zip |
Update `UserDataMethods::add_async_method()` functions to take `&T` as second argument instead of cloning `T`.
New functions: `UserDataMethods::add_async_method_mut()`, `UserDataMethods::add_async_meta_method_mut()`.
Diffstat (limited to 'tests/compile/async_nonstatic_userdata.stderr')
-rw-r--r-- | tests/compile/async_nonstatic_userdata.stderr | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/compile/async_nonstatic_userdata.stderr b/tests/compile/async_nonstatic_userdata.stderr index ac21155..316feb1 100644 --- a/tests/compile/async_nonstatic_userdata.stderr +++ b/tests/compile/async_nonstatic_userdata.stderr @@ -4,11 +4,8 @@ error: lifetime may not live long enough 7 | impl<'a> UserData for MyUserData<'a> { | -- lifetime `'a` defined here 8 | fn add_methods<'lua, M: UserDataMethods<'lua, Self>>(methods: &mut M) { - | ---- lifetime `'lua` defined here 9 | / methods.add_async_method("print", |_, data, ()| async move { 10 | | println!("{}", data.0); 11 | | Ok(()) 12 | | }); - | |______________^ argument requires that `'a` must outlive `'lua` - | - = help: consider adding the following bound: `'a: 'lua` + | |______________^ requires that `'a` must outlive `'static` |