Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add tests for overlapping explicitly dropped locals in generators #62686

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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