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 think it might be possible to detect this situation, using the following technique: move the body of the trait method implementation into a separate inherent method (with a derived name, and returning impl Future or just being async, and then have the trait method call it.
But, this might make the error messages worse in other cases. I thought I would suggest it for your consideration. Thanks!
The text was updated successfully, but these errors were encountered:
Hi. Coincidentally, we had an accidentally-always-recursive
async fn
impl in a trait, leading to stack overflow (https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1197), and I just read about someone else who had the same problem (https://github.com/juspay/hyperswitch/wiki/Ask-not-what-the-compiler-can-do-for-you).I think it might be possible to detect this situation, using the following technique: move the body of the trait method implementation into a separate inherent method (with a derived name, and returning
impl Future
or just beingasync
, and then have the trait method call it.But, this might make the error messages worse in other cases. I thought I would suggest it for your consideration. Thanks!
The text was updated successfully, but these errors were encountered: