Skip to content

Commit ea742a4

Browse files
committed
update test case
1 parent d201e83 commit ea742a4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/test/ui/nll/generator-distinct-lifetime.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212

1313
// Test for issue #47189. Here, both `s` and `t` are live for the
1414
// generator's lifetime, but within the generator they have distinct
15-
// lifetimes.
16-
//
17-
// Currently, we accept this code (with NLL enabled) since `x` is only
18-
// borrowed once at a time -- though whether we should is not entirely
19-
// obvious to me (the borrows are live over a yield, but then they are
20-
// re-borrowing borrowed content, etc). Maybe I just haven't had
21-
// enough coffee today, but I'm not entirely sure at this moment what
22-
// effect a `suspend` should have on existing borrows. -nmatsakis
15+
// lifetimes. We accept this code -- even though the borrow extends
16+
// over a yield -- because the data that is borrowed (`*x`) is not
17+
// stored on the stack.
18+
19+
// must-compile-successfully
2320

2421
fn foo(x: &mut u32) {
2522
move || {

0 commit comments

Comments
 (0)