about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-01-11 17:36:53 -0500
committerNiko Matsakis <niko@alum.mit.edu>2018-01-11 17:36:53 -0500
commitea742a4e5528ba937e4a2e9a15f74ac99287ef88 (patch)
treea1fc916ae4886f85ea06aca34d15e21d548e99bc
parentd201e83f710065ded8f27ef8d072319574ac75c8 (diff)
downloadrust-ea742a4e5528ba937e4a2e9a15f74ac99287ef88.tar.gz
rust-ea742a4e5528ba937e4a2e9a15f74ac99287ef88.zip
update test case
-rw-r--r--src/test/ui/nll/generator-distinct-lifetime.rs13
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 || {