AeneasVerif / charon

Interface with the rustc compiler for the purpose of program verification
Apache License 2.0
79 stars 14 forks source link

Clarify the normalization of types #300

Open Nadrieril opened 1 month ago

Nadrieril commented 1 month ago

There are a few places related to trait solving in charon and hax where we call normalize_erasing_regions. This has the benefit of normalizing associated types (e.g. <T as Trait>::Type becomes RealType in cases where the real type is known) but the drawback of losing region information. Moreover it's not done consistently. We should do this consistently.

If it's only used for associated types we could also normalize these ourselves as part of https://github.com/AeneasVerif/charon/issues/127.