regionck uses wrong body-id, overlooks some region obligations #41502
Labels
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-high
High priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
While working on #41327, I encountered this bug. The following program is accepted but should not be:
The fix is fairly straightforward:
compare_method
needs to use the impl-method id for the "body_id" field, not the id of the impl method's body. This is because it callsregionck_item
which assumes it will do so. I'll have a PR up shortly.The text was updated successfully, but these errors were encountered: