update test case

This commit is contained in:
Niko Matsakis 2018-01-11 17:36:53 -05:00
parent d201e83f71
commit ea742a4e55

View File

@ -12,14 +12,11 @@
// Test for issue #47189. Here, both `s` and `t` are live for the // Test for issue #47189. Here, both `s` and `t` are live for the
// generator's lifetime, but within the generator they have distinct // generator's lifetime, but within the generator they have distinct
// lifetimes. // lifetimes. We accept this code -- even though the borrow extends
// // over a yield -- because the data that is borrowed (`*x`) is not
// Currently, we accept this code (with NLL enabled) since `x` is only // stored on the stack.
// 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 // must-compile-successfully
// 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
fn foo(x: &mut u32) { fn foo(x: &mut u32) {
move || { move || {