Skip to content

Add tests for overlapping explicitly dropped locals in generators #62686

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
tmandry opened this issue Jul 15, 2019 · 0 comments · Fixed by #62707
Closed

Add tests for overlapping explicitly dropped locals in generators #62686

tmandry opened this issue Jul 15, 2019 · 0 comments · Fixed by #62707
Labels
A-coroutines Area: Coroutines E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tmandry
Copy link
Member

tmandry commented Jul 15, 2019

#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.

@jonas-schievink jonas-schievink added A-coroutines Area: Coroutines E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 15, 2019
Centril added a commit to Centril/rust that referenced this issue Jul 25, 2019
…ndry

Add tests for overlapping explicitly dropped locals in generators

Closes rust-lang#62686

r? @tmandry
Centril added a commit to Centril/rust that referenced this issue Jul 25, 2019
…ndry

Add tests for overlapping explicitly dropped locals in generators

Closes rust-lang#62686

r? @tmandry
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-coroutines Area: Coroutines E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants