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
{{ message }}
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
would you be willing/able to run with RUSTC_LOG=debug and check some things in the output?
do you know which part of the code this crashes on, and can't share for some reason, or not sure where it crashes either?
src/traverse.rs:763 is line 776 in current master, which is the case when neither the old nor the new item being compared has any lifetime in the type, but that comparison only goes until max(old.count_lifetimes, new.count_lifetimes), so one of the sides has to have a lifetime or the loop isn't entered in the first place; so i think unless we can get a bit more info on what the input looks like here, we won't be able to do much about it.
i think i found what goes wrong here: the async-trait crate/#[async_trait] attribute do rewriting on functions, so they end up having has_self set to true, but the rewrite removes the &self param/lifetime, so we off-by-one in the loop in which we compare the lifetimes due to wrongly setting self_add == 1. (we index out of bounds of the generics entries, but due to using Vec::get and returning None for both "index out of bounds" and "the ith generic param is not a lifetime" this didn't pop up immediately at the location where it went wrong.)
i have pushed a workaround to #295, but i'm not happy with it as a fix. still, please test if that fixes things for you.
Activity
JohnTitor commentedon Feb 25, 2022
Could you provide your code (if it's public), backtrace, and/or environment? It's hard to debug with only the error message.
hlb8122 commentedon Feb 25, 2022
Really sorry not able to divulge much more than my environment.
dario23 commentedon May 8, 2022
would you be willing/able to run with
RUSTC_LOG=debugand check some things in the output?do you know which part of the code this crashes on, and can't share for some reason, or not sure where it crashes either?
src/traverse.rs:763is line 776 in current master, which is the case when neither the old nor the new item being compared has any lifetime in the type, but that comparison only goes untilmax(old.count_lifetimes, new.count_lifetimes), so one of the sides has to have a lifetime or the loop isn't entered in the first place; so i think unless we can get a bit more info on what the input looks like here, we won't be able to do much about it.leavelet commentedon May 11, 2022
I also encountered this problem. The code is at casbin/casbin-rs
Could you please take a look?
dario23 commentedon May 13, 2022
i think i found what goes wrong here: the async-trait crate/
#[async_trait]attribute do rewriting on functions, so they end up havinghas_selfset totrue, but the rewrite removes the&selfparam/lifetime, so we off-by-one in the loop in which we compare the lifetimes due to wrongly settingself_add == 1. (we index out of bounds of the generics entries, but due to usingVec::getand returningNonefor both "index out of bounds" and "the ith generic param is not a lifetime" this didn't pop up immediately at the location where it went wrong.)i have pushed a workaround to #295, but i'm not happy with it as a fix. still, please test if that fixes things for you.