Test that a malicious user can't shadow items in our derive-generated code #1684
Labels
experience-hard
This issue is hard, and requires a lot of experience
help wanted
Extra attention is needed
Our custom derives sometimes emit code which generates its own internal items. They are designed so that the emitted items will shadow any items defined in the user's code, and thus those outer items can't affect the semantics of our emitted code.
However, we should explicitly test for this. In particular, for every item which is generated by our derives, we should add a test in
zerocopy-derive/tests
which defines items of the same names and confirms that a) compilation succeeds and that, b) the derives are still correct. Determining "correctness" is hard and may differ on a case-by-case basis.The text was updated successfully, but these errors were encountered: