rustanlys / rupta

A Pointer Analysis Framework for Rust
https://rustanlys.github.io/rupta/
GNU General Public License v3.0
36 stars 6 forks source link

Error when resolving trait associated types with higher order lifetime #2

Closed jialunzhang-psu closed 2 months ago

jialunzhang-psu commented 3 months ago

For such a mir assignment,

_4 = Option::<for<'a> fn(&'a ()) -> <S2 as P<'a>>::D>::None;

Rupta throws an error saying "TraitPredicate(<S2 as P<'_>>, polarity:Positive) has escaping bound vars, so it cannot be wrapped in a dummy binder." Looks like the for<'a> lifetime bound was not taken into account, causing a free lifetime 'a.

For a minimal reproducible example, see this.

rustanlys commented 2 months ago

Fixed in commit aff2893.