You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rename Generator to Coroutine
implements rust-lang/compiler-team#682
While I did an automated replacement, I went through all changes manually to avoid renaming things like "id generators", "code generator", ...
I renamed files where that was necessary due to the contents referring to the crate name itself (mir opt, codegen or debuginfo tests), or required by tidy (feature gate docs)
* [x] rename various remaining abbreviated references to generators.
* [x] rename files
* [x] rename folders
* [x] add renamed feature: `generators`, ...
r? `@ghost`
Copy file name to clipboardExpand all lines: tests/fail/coroutine-pinned-moved.stderr
+11-11
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,33 @@
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
-
LL | let mut generator_iterator = Box::new(GeneratorIteratorAdapter(firstn()));
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
-
LL | }; // *deallocate* generator_iterator
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 `<GeneratorIteratorAdapter<{static generator@$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<GeneratorIteratorAdapter<{static generator@$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
-
LL | generator_iterator_2.next(); // and use moved value
30
+
LL | coroutine_iterator_2.next(); // and use moved value
31
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
32
33
33
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
0 commit comments