You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this issue should be here or in rust issues, but it does occur with this library.
Versions
name
version
rust
1.78.0
async-trait
0.1.80
tokio
1.37.0
Description
If we create a trait that has an asynchronous function with immutable reference to itself and try to mutate it we may get an incorrect (as i know) rust code help hint:
help: consider specifying this binding's type
|
15 | async fn non_mutable_fn(&self:&mut TestStruct, new: i32){
| +++++++++++++++++
I don't know if this issue should be here or in rust issues, but it does occur with this library.
Versions
Description
If we create a trait that has an asynchronous function with immutable reference to itself and try to mutate it we may get an incorrect (as i know) rust code help hint:
Full code on rust-playground.com
Or here
Expected behavior
Standard help about mutable reference, without the
async-trait
crate you can achieve that:The text was updated successfully, but these errors were encountered: