charon icon indicating copy to clipboard operation
charon copied to clipboard

Support for Generic Associated Types

Open R1kM opened this issue 1 year ago • 2 comments

E.g.

trait LendingIterator {
    type Item<'a>
    where
        Self: 'a;

    fn next<'a>(&'a mut self) -> Option<Self::Item<'a>>;
}

R1kM avatar Nov 28 '24 13:11 R1kM

Where did you encounter GATs? On code you analysed with Charon or on code you want to verify?

sonmarcho avatar Nov 28 '24 15:11 sonmarcho

There's a common trait in the rust-crypto ecosystem that has GATs. But this was just an issue to track known unsupported features.

Nadrieril avatar Nov 28 '24 16:11 Nadrieril

https://github.com/AeneasVerif/charon/pull/816 implements support for GATs. We may not yet support all possible GATs but the feature is basically implemented; we can track the reamining bugs in individual issues as we find them.

Nadrieril avatar Sep 16 '25 15:09 Nadrieril