Skip to content

Test that a malicious user can't shadow items in our derive-generated code #1684

@joshlf

Description

@joshlf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    experience-hardThis issue is hard, and requires a lot of experiencehelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions