Skip to content

Add tests for overlapping explicitly dropped locals in generators #62686

@tmandry

Description

@tmandry

#61922 allows us to overlap x and y in this example:

fn gen() { let x = [0u8; 1024]; yield; drop(x); let y = [0u8;1024]; yield; drop(y); }

Come to think of it, this is a pretty important behavior that I should have added an explicit test for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-coroutinesArea: CoroutinesE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions