File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 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
2421fn foo ( x : & mut u32 ) {
2522 move || {
You can’t perform that action at this time.
0 commit comments