File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 12
12
13
13
// Test for issue #47189. Here, both `s` and `t` are live for the
14
14
// 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
23
20
24
21
fn foo ( x : & mut u32 ) {
25
22
move || {
You can’t perform that action at this time.
0 commit comments