|
1 | 1 | error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling
|
2 |
| - --> $DIR/generator-pinned-moved.rs:LL:CC |
| 2 | + --> $DIR/coroutine-pinned-moved.rs:LL:CC |
3 | 3 | |
|
4 | 4 | LL | *num += 1;
|
5 | 5 | | ^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
6 | 6 | |
|
7 | 7 | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
8 | 8 | = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
9 | 9 | help: ALLOC was allocated here:
|
10 |
| - --> $DIR/generator-pinned-moved.rs:LL:CC |
| 10 | + --> $DIR/coroutine-pinned-moved.rs:LL:CC |
11 | 11 | |
|
12 | 12 | LL | let mut coroutine_iterator = Box::new(CoroutineIteratorAdapter(firstn()));
|
13 | 13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
14 | 14 | help: ALLOC was deallocated here:
|
15 |
| - --> $DIR/generator-pinned-moved.rs:LL:CC |
| 15 | + --> $DIR/coroutine-pinned-moved.rs:LL:CC |
16 | 16 | |
|
17 | 17 | LL | }; // *deallocate* coroutine_iterator
|
18 | 18 | | ^
|
19 | 19 | = note: BACKTRACE (of the first span):
|
20 |
| - = note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC |
21 |
| -note: inside `<CoroutineIteratorAdapter<{static coroutine@$DIR/generator-pinned-moved.rs:LL:CC}> as std::iter::Iterator>::next` |
22 |
| - --> $DIR/generator-pinned-moved.rs:LL:CC |
| 20 | + = note: inside closure at $DIR/coroutine-pinned-moved.rs:LL:CC |
| 21 | +note: inside `<CoroutineIteratorAdapter<{static coroutine@$DIR/coroutine-pinned-moved.rs:LL:CC}> as std::iter::Iterator>::next` |
| 22 | + --> $DIR/coroutine-pinned-moved.rs:LL:CC |
23 | 23 | |
|
24 | 24 | LL | match me.resume(()) {
|
25 | 25 | | ^^^^^^^^^^^^^
|
26 |
| - = note: inside `<std::boxed::Box<CoroutineIteratorAdapter<{static coroutine@$DIR/generator-pinned-moved.rs:LL:CC}>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC |
| 26 | + = note: inside `<std::boxed::Box<CoroutineIteratorAdapter<{static coroutine@$DIR/coroutine-pinned-moved.rs:LL:CC}>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC |
27 | 27 | note: inside `main`
|
28 |
| - --> $DIR/generator-pinned-moved.rs:LL:CC |
| 28 | + --> $DIR/coroutine-pinned-moved.rs:LL:CC |
29 | 29 | |
|
30 | 30 | LL | coroutine_iterator_2.next(); // and use moved value
|
31 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
0 commit comments