diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-01-11 17:36:53 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-01-11 17:36:53 -0500 |
| commit | ea742a4e5528ba937e4a2e9a15f74ac99287ef88 (patch) | |
| tree | a1fc916ae4886f85ea06aca34d15e21d548e99bc | |
| parent | d201e83f710065ded8f27ef8d072319574ac75c8 (diff) | |
| download | rust-ea742a4e5528ba937e4a2e9a15f74ac99287ef88.tar.gz rust-ea742a4e5528ba937e4a2e9a15f74ac99287ef88.zip | |
update test case
| -rw-r--r-- | src/test/ui/nll/generator-distinct-lifetime.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/test/ui/nll/generator-distinct-lifetime.rs b/src/test/ui/nll/generator-distinct-lifetime.rs index 261d1bf85b1..60f67b1766c 100644 --- a/src/test/ui/nll/generator-distinct-lifetime.rs +++ b/src/test/ui/nll/generator-distinct-lifetime.rs @@ -12,14 +12,11 @@ // Test for issue #47189. Here, both `s` and `t` are live for the // generator's lifetime, but within the generator they have distinct -// lifetimes. -// -// Currently, we accept this code (with NLL enabled) since `x` is only -// borrowed once at a time -- though whether we should is not entirely -// obvious to me (the borrows are live over a yield, but then they are -// re-borrowing borrowed content, etc). Maybe I just haven't had -// enough coffee today, but I'm not entirely sure at this moment what -// effect a `suspend` should have on existing borrows. -nmatsakis +// lifetimes. We accept this code -- even though the borrow extends +// over a yield -- because the data that is borrowed (`*x`) is not +// stored on the stack. + +// must-compile-successfully fn foo(x: &mut u32) { move || { |
