diff --git a/src/tools/miri/tests/fail/generator-pinned-moved.rs b/src/tools/miri/tests/fail/coroutine-pinned-moved.rs similarity index 100% rename from src/tools/miri/tests/fail/generator-pinned-moved.rs rename to src/tools/miri/tests/fail/coroutine-pinned-moved.rs diff --git a/src/tools/miri/tests/fail/generator-pinned-moved.stderr b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr similarity index 100% rename from src/tools/miri/tests/fail/generator-pinned-moved.stderr rename to src/tools/miri/tests/fail/coroutine-pinned-moved.stderr diff --git a/src/tools/miri/tests/pass/stacked-borrows/generators-self-referential.rs b/src/tools/miri/tests/pass/stacked-borrows/coroutine-self-referential.rs similarity index 100% rename from src/tools/miri/tests/pass/stacked-borrows/generators-self-referential.rs rename to src/tools/miri/tests/pass/stacked-borrows/coroutine-self-referential.rs diff --git a/src/tools/rustfmt/tests/source/immovable_generators.rs b/src/tools/rustfmt/tests/source/immovable_coroutines.rs similarity index 100% rename from src/tools/rustfmt/tests/source/immovable_generators.rs rename to src/tools/rustfmt/tests/source/immovable_coroutines.rs diff --git a/src/tools/rustfmt/tests/target/immovable_generators.rs b/src/tools/rustfmt/tests/target/immovable_coroutines.rs similarity index 100% rename from src/tools/rustfmt/tests/target/immovable_generators.rs rename to src/tools/rustfmt/tests/target/immovable_coroutines.rs diff --git a/tests/codegen/generator-debug-msvc.rs b/tests/codegen/coroutine-debug-msvc.rs similarity index 100% rename from tests/codegen/generator-debug-msvc.rs rename to tests/codegen/coroutine-debug-msvc.rs diff --git a/tests/codegen/generator-debug.rs b/tests/codegen/coroutine-debug.rs similarity index 100% rename from tests/codegen/generator-debug.rs rename to tests/codegen/coroutine-debug.rs diff --git a/tests/coverage-map/status-quo/generator.cov-map b/tests/coverage-map/status-quo/coroutine.cov-map similarity index 100% rename from tests/coverage-map/status-quo/generator.cov-map rename to tests/coverage-map/status-quo/coroutine.cov-map diff --git a/tests/coverage-map/status-quo/generator.rs b/tests/coverage-map/status-quo/coroutine.rs similarity index 100% rename from tests/coverage-map/status-quo/generator.rs rename to tests/coverage-map/status-quo/coroutine.rs diff --git a/tests/run-coverage/generator.coverage b/tests/run-coverage/coroutine.coverage similarity index 100% rename from tests/run-coverage/generator.coverage rename to tests/run-coverage/coroutine.coverage diff --git a/tests/ui/async-await/generator-desc.rs b/tests/ui/async-await/coroutine-desc.rs similarity index 100% rename from tests/ui/async-await/generator-desc.rs rename to tests/ui/async-await/coroutine-desc.rs diff --git a/tests/ui/async-await/generator-desc.stderr b/tests/ui/async-await/coroutine-desc.stderr similarity index 79% rename from tests/ui/async-await/generator-desc.stderr rename to tests/ui/async-await/coroutine-desc.stderr index d3e951cfe49..e4cb0915a10 100644 --- a/tests/ui/async-await/generator-desc.stderr +++ b/tests/ui/async-await/coroutine-desc.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/generator-desc.rs:10:19 + --> $DIR/coroutine-desc.rs:10:19 | LL | fun(async {}, async {}); | --- -------- ^^^^^^^^ expected `async` block, found a different `async` block @@ -7,16 +7,16 @@ LL | fun(async {}, async {}); | | the expected `async` block | arguments to this function are incorrect | - = note: expected `async` block `{async block@$DIR/generator-desc.rs:10:9: 10:17}` - found `async` block `{async block@$DIR/generator-desc.rs:10:19: 10:27}` + = note: expected `async` block `{async block@$DIR/coroutine-desc.rs:10:9: 10:17}` + found `async` block `{async block@$DIR/coroutine-desc.rs:10:19: 10:27}` note: function defined here - --> $DIR/generator-desc.rs:8:4 + --> $DIR/coroutine-desc.rs:8:4 | LL | fn fun>(f1: F, f2: F) {} | ^^^ ----- error[E0308]: mismatched types - --> $DIR/generator-desc.rs:12:16 + --> $DIR/coroutine-desc.rs:12:16 | LL | fun(one(), two()); | --- ^^^^^ expected future, found a different future @@ -26,13 +26,13 @@ LL | fun(one(), two()); = help: consider `await`ing on both `Future`s = note: distinct uses of `impl Trait` result in different opaque types note: function defined here - --> $DIR/generator-desc.rs:8:4 + --> $DIR/coroutine-desc.rs:8:4 | LL | fn fun>(f1: F, f2: F) {} | ^^^ ----- error[E0308]: mismatched types - --> $DIR/generator-desc.rs:14:26 + --> $DIR/coroutine-desc.rs:14:26 | LL | fun((async || {})(), (async || {})()); | --- -- ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body @@ -40,10 +40,10 @@ LL | fun((async || {})(), (async || {})()); | | the expected `async` closure body | arguments to this function are incorrect | - = note: expected `async` closure body `{async closure body@$DIR/generator-desc.rs:14:19: 14:21}` - found `async` closure body `{async closure body@$DIR/generator-desc.rs:14:36: 14:38}` + = note: expected `async` closure body `{async closure body@$DIR/coroutine-desc.rs:14:19: 14:21}` + found `async` closure body `{async closure body@$DIR/coroutine-desc.rs:14:36: 14:38}` note: function defined here - --> $DIR/generator-desc.rs:8:4 + --> $DIR/coroutine-desc.rs:8:4 | LL | fn fun>(f1: F, f2: F) {} | ^^^ ----- diff --git a/tests/ui/async-await/generator-not-future.rs b/tests/ui/async-await/coroutine-not-future.rs similarity index 100% rename from tests/ui/async-await/generator-not-future.rs rename to tests/ui/async-await/coroutine-not-future.rs diff --git a/tests/ui/async-await/generator-not-future.stderr b/tests/ui/async-await/coroutine-not-future.stderr similarity index 79% rename from tests/ui/async-await/generator-not-future.stderr rename to tests/ui/async-await/coroutine-not-future.stderr index 0352e9ff82c..130c5ef526b 100644 --- a/tests/ui/async-await/generator-not-future.stderr +++ b/tests/ui/async-await/coroutine-not-future.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `impl Future: Coroutine<_>` is not satisfied - --> $DIR/generator-not-future.rs:31:21 + --> $DIR/coroutine-not-future.rs:31:21 | LL | takes_coroutine(async_fn()); | --------------- ^^^^^^^^^^ the trait `Coroutine<_>` is not implemented for `impl Future` @@ -7,13 +7,13 @@ LL | takes_coroutine(async_fn()); | required by a bound introduced by this call | note: required by a bound in `takes_coroutine` - --> $DIR/generator-not-future.rs:18:39 + --> $DIR/coroutine-not-future.rs:18:39 | LL | fn takes_coroutine(_g: impl Coroutine) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine` error[E0277]: the trait bound `impl Future: Coroutine<_>` is not satisfied - --> $DIR/generator-not-future.rs:33:21 + --> $DIR/coroutine-not-future.rs:33:21 | LL | takes_coroutine(returns_async_block()); | --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine<_>` is not implemented for `impl Future` @@ -21,27 +21,27 @@ LL | takes_coroutine(returns_async_block()); | required by a bound introduced by this call | note: required by a bound in `takes_coroutine` - --> $DIR/generator-not-future.rs:18:39 + --> $DIR/coroutine-not-future.rs:18:39 | LL | fn takes_coroutine(_g: impl Coroutine) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine` -error[E0277]: the trait bound `{async block@$DIR/generator-not-future.rs:35:21: 35:29}: Coroutine<_>` is not satisfied - --> $DIR/generator-not-future.rs:35:21 +error[E0277]: the trait bound `{async block@$DIR/coroutine-not-future.rs:35:21: 35:29}: Coroutine<_>` is not satisfied + --> $DIR/coroutine-not-future.rs:35:21 | LL | takes_coroutine(async {}); - | --------------- ^^^^^^^^ the trait `Coroutine<_>` is not implemented for `{async block@$DIR/generator-not-future.rs:35:21: 35:29}` + | --------------- ^^^^^^^^ the trait `Coroutine<_>` is not implemented for `{async block@$DIR/coroutine-not-future.rs:35:21: 35:29}` | | | required by a bound introduced by this call | note: required by a bound in `takes_coroutine` - --> $DIR/generator-not-future.rs:18:39 + --> $DIR/coroutine-not-future.rs:18:39 | LL | fn takes_coroutine(_g: impl Coroutine) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine` error[E0277]: `impl Coroutine` is not a future - --> $DIR/generator-not-future.rs:39:18 + --> $DIR/coroutine-not-future.rs:39:18 | LL | takes_future(returns_coroutine()); | ------------ ^^^^^^^^^^^^^^^^^^^ `impl Coroutine` is not a future @@ -51,13 +51,13 @@ LL | takes_future(returns_coroutine()); = help: the trait `Future` is not implemented for `impl Coroutine` = note: impl Coroutine must be a future or must implement `IntoFuture` to be awaited note: required by a bound in `takes_future` - --> $DIR/generator-not-future.rs:17:26 + --> $DIR/coroutine-not-future.rs:17:26 | LL | fn takes_future(_f: impl Future) {} | ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future` -error[E0277]: `{coroutine@$DIR/generator-not-future.rs:41:18: 41:23}` is not a future - --> $DIR/generator-not-future.rs:41:18 +error[E0277]: `{coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23}` is not a future + --> $DIR/coroutine-not-future.rs:41:18 | LL | takes_future(|ctx| { | _____------------_^ @@ -66,12 +66,12 @@ LL | takes_future(|ctx| { LL | | LL | | ctx = yield (); LL | | }); - | |_____^ `{coroutine@$DIR/generator-not-future.rs:41:18: 41:23}` is not a future + | |_____^ `{coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23}` is not a future | - = help: the trait `Future` is not implemented for `{coroutine@$DIR/generator-not-future.rs:41:18: 41:23}` - = note: {coroutine@$DIR/generator-not-future.rs:41:18: 41:23} must be a future or must implement `IntoFuture` to be awaited + = help: the trait `Future` is not implemented for `{coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23}` + = note: {coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23} must be a future or must implement `IntoFuture` to be awaited note: required by a bound in `takes_future` - --> $DIR/generator-not-future.rs:17:26 + --> $DIR/coroutine-not-future.rs:17:26 | LL | fn takes_future(_f: impl Future) {} | ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future` diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs similarity index 100% rename from tests/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs rename to tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs diff --git a/tests/ui/coherence/coherence-with-generator.rs b/tests/ui/coherence/coherence-with-coroutine.rs similarity index 100% rename from tests/ui/coherence/coherence-with-generator.rs rename to tests/ui/coherence/coherence-with-coroutine.rs diff --git a/tests/ui/coherence/coherence-with-generator.stock.stderr b/tests/ui/coherence/coherence-with-coroutine.stock.stderr similarity index 91% rename from tests/ui/coherence/coherence-with-generator.stock.stderr rename to tests/ui/coherence/coherence-with-coroutine.stock.stderr index 7636227e534..b2a9135c542 100644 --- a/tests/ui/coherence/coherence-with-generator.stock.stderr +++ b/tests/ui/coherence/coherence-with-coroutine.stock.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper` - --> $DIR/coherence-with-generator.rs:21:1 + --> $DIR/coherence-with-coroutine.rs:21:1 | LL | impl Trait for Wrapper {} | --------------------------------------- first implementation here diff --git a/tests/ui/generator/async-generator-issue-67158.rs b/tests/ui/generator/async-coroutine-issue-67158.rs similarity index 100% rename from tests/ui/generator/async-generator-issue-67158.rs rename to tests/ui/generator/async-coroutine-issue-67158.rs diff --git a/tests/ui/generator/async-generator-issue-67158.stderr b/tests/ui/generator/async-coroutine-issue-67158.stderr similarity index 83% rename from tests/ui/generator/async-generator-issue-67158.stderr rename to tests/ui/generator/async-coroutine-issue-67158.stderr index 6b7f09a2dc4..d583d3d5ea0 100644 --- a/tests/ui/generator/async-generator-issue-67158.stderr +++ b/tests/ui/generator/async-coroutine-issue-67158.stderr @@ -1,5 +1,5 @@ error[E0727]: `async` coroutines are not yet supported - --> $DIR/async-generator-issue-67158.rs:5:13 + --> $DIR/async-coroutine-issue-67158.rs:5:13 | LL | async { yield print!(":C") }; | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/generator/generator-region-requirements.migrate.stderr b/tests/ui/generator/coroutine-region-requirements.migrate.stderr similarity index 100% rename from tests/ui/generator/generator-region-requirements.migrate.stderr rename to tests/ui/generator/coroutine-region-requirements.migrate.stderr diff --git a/tests/ui/generator/generator-region-requirements.rs b/tests/ui/generator/coroutine-region-requirements.rs similarity index 100% rename from tests/ui/generator/generator-region-requirements.rs rename to tests/ui/generator/coroutine-region-requirements.rs diff --git a/tests/ui/generator/generator-region-requirements.stderr b/tests/ui/generator/coroutine-region-requirements.stderr similarity index 88% rename from tests/ui/generator/generator-region-requirements.stderr rename to tests/ui/generator/coroutine-region-requirements.stderr index 1c47e528905..ad3183e7612 100644 --- a/tests/ui/generator/generator-region-requirements.stderr +++ b/tests/ui/generator/coroutine-region-requirements.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/generator-region-requirements.rs:12:51 + --> $DIR/coroutine-region-requirements.rs:12:51 | LL | fn dangle(x: &mut i32) -> &'static mut i32 { | - let's call the lifetime of this reference `'1` diff --git a/tests/ui/generator/generator-resume-after-panic.rs b/tests/ui/generator/coroutine-resume-after-panic.rs similarity index 100% rename from tests/ui/generator/generator-resume-after-panic.rs rename to tests/ui/generator/coroutine-resume-after-panic.rs diff --git a/tests/ui/generator/generator-with-nll.rs b/tests/ui/generator/coroutine-with-nll.rs similarity index 100% rename from tests/ui/generator/generator-with-nll.rs rename to tests/ui/generator/coroutine-with-nll.rs diff --git a/tests/ui/generator/generator-with-nll.stderr b/tests/ui/generator/coroutine-with-nll.stderr similarity index 89% rename from tests/ui/generator/generator-with-nll.stderr rename to tests/ui/generator/coroutine-with-nll.stderr index 083d4bf6246..ed58debe2b4 100644 --- a/tests/ui/generator/generator-with-nll.stderr +++ b/tests/ui/generator/coroutine-with-nll.stderr @@ -1,5 +1,5 @@ error[E0626]: borrow may still be in use when coroutine yields - --> $DIR/generator-with-nll.rs:7:17 + --> $DIR/coroutine-with-nll.rs:7:17 | LL | let b = &mut true; | ^^^^^^^^^ diff --git a/tests/ui/generator/generator-yielding-or-returning-itself.rs b/tests/ui/generator/coroutine-yielding-or-returning-itself.rs similarity index 100% rename from tests/ui/generator/generator-yielding-or-returning-itself.rs rename to tests/ui/generator/coroutine-yielding-or-returning-itself.rs diff --git a/tests/ui/generator/generator-yielding-or-returning-itself.stderr b/tests/ui/generator/coroutine-yielding-or-returning-itself.stderr similarity index 75% rename from tests/ui/generator/generator-yielding-or-returning-itself.stderr rename to tests/ui/generator/coroutine-yielding-or-returning-itself.stderr index 348fbc96692..325030524ba 100644 --- a/tests/ui/generator/generator-yielding-or-returning-itself.stderr +++ b/tests/ui/generator/coroutine-yielding-or-returning-itself.stderr @@ -1,5 +1,5 @@ -error[E0271]: type mismatch resolving `<{coroutine@$DIR/generator-yielding-or-returning-itself.rs:15:34: 15:36} as Coroutine>::Return == {coroutine@$DIR/generator-yielding-or-returning-itself.rs:15:34: 15:36}` - --> $DIR/generator-yielding-or-returning-itself.rs:15:34 +error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:15:34: 15:36} as Coroutine>::Return == {coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:15:34: 15:36}` + --> $DIR/coroutine-yielding-or-returning-itself.rs:15:34 | LL | want_cyclic_coroutine_return(|| { | _____----------------------------_^ @@ -16,15 +16,15 @@ LL | | }) see issue #46062 for more information note: required by a bound in `want_cyclic_coroutine_return` - --> $DIR/generator-yielding-or-returning-itself.rs:10:36 + --> $DIR/coroutine-yielding-or-returning-itself.rs:10:36 | LL | pub fn want_cyclic_coroutine_return(_: T) | ---------------------------- required by a bound in this function LL | where T: Coroutine | ^^^^^^^^^^ required by this bound in `want_cyclic_coroutine_return` -error[E0271]: type mismatch resolving `<{coroutine@$DIR/generator-yielding-or-returning-itself.rs:28:33: 28:35} as Coroutine>::Yield == {coroutine@$DIR/generator-yielding-or-returning-itself.rs:28:33: 28:35}` - --> $DIR/generator-yielding-or-returning-itself.rs:28:33 +error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:28:33: 28:35} as Coroutine>::Yield == {coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:28:33: 28:35}` + --> $DIR/coroutine-yielding-or-returning-itself.rs:28:33 | LL | want_cyclic_coroutine_yield(|| { | _____---------------------------_^ @@ -41,7 +41,7 @@ LL | | }) see issue #46062 for more information note: required by a bound in `want_cyclic_coroutine_yield` - --> $DIR/generator-yielding-or-returning-itself.rs:23:24 + --> $DIR/coroutine-yielding-or-returning-itself.rs:23:24 | LL | pub fn want_cyclic_coroutine_yield(_: T) | --------------------------- required by a bound in this function diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs b/tests/ui/generator/issue-110929-coroutine-conflict-error-ice.rs similarity index 100% rename from tests/ui/generator/issue-110929-generator-conflict-error-ice.rs rename to tests/ui/generator/issue-110929-coroutine-conflict-error-ice.rs diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr b/tests/ui/generator/issue-110929-coroutine-conflict-error-ice.stderr similarity index 91% rename from tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr rename to tests/ui/generator/issue-110929-coroutine-conflict-error-ice.stderr index 5ee7e999980..77da6c4cdc9 100644 --- a/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr +++ b/tests/ui/generator/issue-110929-coroutine-conflict-error-ice.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/issue-110929-generator-conflict-error-ice.rs:8:9 + --> $DIR/issue-110929-coroutine-conflict-error-ice.rs:8:9 | LL | let _c = || yield *&mut *x; | -- -- first borrow occurs due to use of `*x` in coroutine diff --git a/tests/ui/generator/issue-45729-unsafe-in-generator.mir.stderr b/tests/ui/generator/issue-45729-unsafe-in-coroutine.mir.stderr similarity index 90% rename from tests/ui/generator/issue-45729-unsafe-in-generator.mir.stderr rename to tests/ui/generator/issue-45729-unsafe-in-coroutine.mir.stderr index 3afbea07931..a9a0d629606 100644 --- a/tests/ui/generator/issue-45729-unsafe-in-generator.mir.stderr +++ b/tests/ui/generator/issue-45729-unsafe-in-coroutine.mir.stderr @@ -1,5 +1,5 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block - --> $DIR/issue-45729-unsafe-in-generator.rs:8:9 + --> $DIR/issue-45729-unsafe-in-coroutine.rs:8:9 | LL | *(1 as *mut u32) = 42; | ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer diff --git a/tests/ui/generator/issue-45729-unsafe-in-generator.rs b/tests/ui/generator/issue-45729-unsafe-in-coroutine.rs similarity index 100% rename from tests/ui/generator/issue-45729-unsafe-in-generator.rs rename to tests/ui/generator/issue-45729-unsafe-in-coroutine.rs diff --git a/tests/ui/generator/issue-45729-unsafe-in-generator.thir.stderr b/tests/ui/generator/issue-45729-unsafe-in-coroutine.thir.stderr similarity index 90% rename from tests/ui/generator/issue-45729-unsafe-in-generator.thir.stderr rename to tests/ui/generator/issue-45729-unsafe-in-coroutine.thir.stderr index 10d768f19fc..22c83e9a3d5 100644 --- a/tests/ui/generator/issue-45729-unsafe-in-generator.thir.stderr +++ b/tests/ui/generator/issue-45729-unsafe-in-coroutine.thir.stderr @@ -1,5 +1,5 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block - --> $DIR/issue-45729-unsafe-in-generator.rs:8:9 + --> $DIR/issue-45729-unsafe-in-coroutine.rs:8:9 | LL | *(1 as *mut u32) = 42; | ^^^^^^^^^^^^^^^^ dereference of raw pointer diff --git a/tests/ui/generator/nested_generators.rs b/tests/ui/generator/nested_coroutine.rs similarity index 100% rename from tests/ui/generator/nested_generators.rs rename to tests/ui/generator/nested_coroutine.rs diff --git a/tests/ui/generator/niche-in-generator.rs b/tests/ui/generator/niche-in-coroutine.rs similarity index 100% rename from tests/ui/generator/niche-in-generator.rs rename to tests/ui/generator/niche-in-coroutine.rs diff --git a/tests/ui/generator/pin-box-generator.rs b/tests/ui/generator/pin-box-coroutine.rs similarity index 100% rename from tests/ui/generator/pin-box-generator.rs rename to tests/ui/generator/pin-box-coroutine.rs diff --git a/tests/ui/generator/print/generator-print-verbose-1.rs b/tests/ui/generator/print/coroutine-print-verbose-1.rs similarity index 100% rename from tests/ui/generator/print/generator-print-verbose-1.rs rename to tests/ui/generator/print/coroutine-print-verbose-1.rs diff --git a/tests/ui/generator/print/generator-print-verbose-1.stderr b/tests/ui/generator/print/coroutine-print-verbose-1.stderr similarity index 75% rename from tests/ui/generator/print/generator-print-verbose-1.stderr rename to tests/ui/generator/print/coroutine-print-verbose-1.stderr index f20aca71149..bcdcbc154cf 100644 --- a/tests/ui/generator/print/generator-print-verbose-1.stderr +++ b/tests/ui/generator/print/coroutine-print-verbose-1.stderr @@ -1,5 +1,5 @@ error: coroutine cannot be sent between threads safely - --> $DIR/generator-print-verbose-1.rs:37:5 + --> $DIR/coroutine-print-verbose-1.rs:37:5 | LL | require_send(send_gen); | ^^^^^^^^^^^^ coroutine is not `Send` @@ -7,20 +7,20 @@ LL | require_send(send_gen); = help: the trait `Sync` is not implemented for `RefCell` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead note: coroutine is not `Send` as this value is used across a yield - --> $DIR/generator-print-verbose-1.rs:35:9 + --> $DIR/coroutine-print-verbose-1.rs:35:9 | LL | let _non_send_gen = make_non_send_coroutine(); - | ------------- has type `Opaque(DefId(0:34 ~ generator_print_verbose_1[7d1d]::make_non_send_coroutine::{opaque#0}), [])` which is not `Send` + | ------------- has type `Opaque(DefId(0:34 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine::{opaque#0}), [])` which is not `Send` LL | yield; | ^^^^^ yield occurs here, with `_non_send_gen` maybe used later note: required by a bound in `require_send` - --> $DIR/generator-print-verbose-1.rs:26:25 + --> $DIR/coroutine-print-verbose-1.rs:26:25 | LL | fn require_send(_: impl Send) {} | ^^^^ required by this bound in `require_send` error[E0277]: `RefCell` cannot be shared between threads safely - --> $DIR/generator-print-verbose-1.rs:56:5 + --> $DIR/coroutine-print-verbose-1.rs:56:5 | LL | require_send(send_gen); | ^^^^^^^^^^^^ `RefCell` cannot be shared between threads safely @@ -29,28 +29,28 @@ LL | require_send(send_gen); = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead = note: required for `Arc>` to implement `Send` note: required because it's used within this coroutine - --> $DIR/generator-print-verbose-1.rs:42:5 + --> $DIR/coroutine-print-verbose-1.rs:42:5 | LL | || { | ^^ -note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[7d1d]::make_gen2::{opaque#0}), [Arc>])` - --> $DIR/generator-print-verbose-1.rs:41:30 +note: required because it appears within the type `Opaque(DefId(0:35 ~ coroutine_print_verbose_1[75fb]::make_gen2::{opaque#0}), [Arc>])` + --> $DIR/coroutine-print-verbose-1.rs:41:30 | LL | pub fn make_gen2(t: T) -> impl Coroutine { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: required because it appears within the type `Opaque(DefId(0:36 ~ generator_print_verbose_1[7d1d]::make_non_send_coroutine2::{opaque#0}), [])` - --> $DIR/generator-print-verbose-1.rs:47:34 +note: required because it appears within the type `Opaque(DefId(0:36 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine2::{opaque#0}), [])` + --> $DIR/coroutine-print-verbose-1.rs:47:34 | LL | fn make_non_send_coroutine2() -> impl Coroutine>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: required because it captures the following types: `Opaque(DefId(0:36 ~ generator_print_verbose_1[7d1d]::make_non_send_coroutine2::{opaque#0}), [])` + = note: required because it captures the following types: `Opaque(DefId(0:36 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine2::{opaque#0}), [])` note: required because it's used within this coroutine - --> $DIR/generator-print-verbose-1.rs:52:20 + --> $DIR/coroutine-print-verbose-1.rs:52:20 | LL | let send_gen = || { | ^^ note: required by a bound in `require_send` - --> $DIR/generator-print-verbose-1.rs:26:25 + --> $DIR/coroutine-print-verbose-1.rs:26:25 | LL | fn require_send(_: impl Send) {} | ^^^^ required by this bound in `require_send` diff --git a/tests/ui/generator/print/generator-print-verbose-2.rs b/tests/ui/generator/print/coroutine-print-verbose-2.rs similarity index 100% rename from tests/ui/generator/print/generator-print-verbose-2.rs rename to tests/ui/generator/print/coroutine-print-verbose-2.rs diff --git a/tests/ui/generator/print/generator-print-verbose-2.stderr b/tests/ui/generator/print/coroutine-print-verbose-2.stderr similarity index 83% rename from tests/ui/generator/print/generator-print-verbose-2.stderr rename to tests/ui/generator/print/coroutine-print-verbose-2.stderr index 9fda110dfc0..e9c7a8ffcaa 100644 --- a/tests/ui/generator/print/generator-print-verbose-2.stderr +++ b/tests/ui/generator/print/coroutine-print-verbose-2.stderr @@ -1,39 +1,39 @@ error: coroutine cannot be shared between threads safely - --> $DIR/generator-print-verbose-2.rs:17:5 + --> $DIR/coroutine-print-verbose-2.rs:17:5 | LL | assert_sync(|| { | ^^^^^^^^^^^ coroutine is not `Sync` | = help: within `{main::{closure#0} upvar_tys=() {main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync` note: coroutine is not `Sync` as this value is used across a yield - --> $DIR/generator-print-verbose-2.rs:20:9 + --> $DIR/coroutine-print-verbose-2.rs:20:9 | LL | let a = NotSync; | - has type `NotSync` which is not `Sync` LL | yield; | ^^^^^ yield occurs here, with `a` maybe used later note: required by a bound in `assert_sync` - --> $DIR/generator-print-verbose-2.rs:14:23 + --> $DIR/coroutine-print-verbose-2.rs:14:23 | LL | fn assert_sync(_: T) {} | ^^^^ required by this bound in `assert_sync` error: coroutine cannot be sent between threads safely - --> $DIR/generator-print-verbose-2.rs:24:5 + --> $DIR/coroutine-print-verbose-2.rs:24:5 | LL | assert_send(|| { | ^^^^^^^^^^^ coroutine is not `Send` | = help: within `{main::{closure#1} upvar_tys=() {main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend` note: coroutine is not `Send` as this value is used across a yield - --> $DIR/generator-print-verbose-2.rs:27:9 + --> $DIR/coroutine-print-verbose-2.rs:27:9 | LL | let a = NotSend; | - has type `NotSend` which is not `Send` LL | yield; | ^^^^^ yield occurs here, with `a` maybe used later note: required by a bound in `assert_send` - --> $DIR/generator-print-verbose-2.rs:15:23 + --> $DIR/coroutine-print-verbose-2.rs:15:23 | LL | fn assert_send(_: T) {} | ^^^^ required by this bound in `assert_send` diff --git a/tests/ui/generator/print/generator-print-verbose-3.rs b/tests/ui/generator/print/coroutine-print-verbose-3.rs similarity index 100% rename from tests/ui/generator/print/generator-print-verbose-3.rs rename to tests/ui/generator/print/coroutine-print-verbose-3.rs diff --git a/tests/ui/generator/print/generator-print-verbose-3.stderr b/tests/ui/generator/print/coroutine-print-verbose-3.stderr similarity index 92% rename from tests/ui/generator/print/generator-print-verbose-3.stderr rename to tests/ui/generator/print/coroutine-print-verbose-3.stderr index 5ebe3e5e575..fb80f29d10d 100644 --- a/tests/ui/generator/print/generator-print-verbose-3.stderr +++ b/tests/ui/generator/print/coroutine-print-verbose-3.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/generator-print-verbose-3.rs:7:25 + --> $DIR/coroutine-print-verbose-3.rs:7:25 | LL | let coroutine :() = || { | ____________________--___^ diff --git a/tests/ui/generator/static-generators.rs b/tests/ui/generator/static-coroutine.rs similarity index 100% rename from tests/ui/generator/static-generators.rs rename to tests/ui/generator/static-coroutine.rs diff --git a/tests/ui/generator/yield-outside-generator-issue-78653.rs b/tests/ui/generator/yield-outside-coroutine-issue-78653.rs similarity index 100% rename from tests/ui/generator/yield-outside-generator-issue-78653.rs rename to tests/ui/generator/yield-outside-coroutine-issue-78653.rs diff --git a/tests/ui/generator/yield-outside-generator-issue-78653.stderr b/tests/ui/generator/yield-outside-coroutine-issue-78653.stderr similarity index 87% rename from tests/ui/generator/yield-outside-generator-issue-78653.stderr rename to tests/ui/generator/yield-outside-coroutine-issue-78653.stderr index b6b57c8309e..f28f8913508 100644 --- a/tests/ui/generator/yield-outside-generator-issue-78653.stderr +++ b/tests/ui/generator/yield-outside-coroutine-issue-78653.stderr @@ -1,11 +1,11 @@ error[E0627]: yield expression outside of coroutine literal - --> $DIR/yield-outside-generator-issue-78653.rs:4:5 + --> $DIR/yield-outside-coroutine-issue-78653.rs:4:5 | LL | yield || for i in 0 { } | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `{integer}` is not an iterator - --> $DIR/yield-outside-generator-issue-78653.rs:4:23 + --> $DIR/yield-outside-coroutine-issue-78653.rs:4:23 | LL | yield || for i in 0 { } | ^ `{integer}` is not an iterator diff --git a/tests/ui/impl-trait/recursive-generator.rs b/tests/ui/impl-trait/recursive-coroutine.rs similarity index 100% rename from tests/ui/impl-trait/recursive-generator.rs rename to tests/ui/impl-trait/recursive-coroutine.rs diff --git a/tests/ui/impl-trait/recursive-generator.stderr b/tests/ui/impl-trait/recursive-coroutine.stderr similarity index 91% rename from tests/ui/impl-trait/recursive-generator.stderr rename to tests/ui/impl-trait/recursive-coroutine.stderr index c407a6a6e07..d36a58a8643 100644 --- a/tests/ui/impl-trait/recursive-generator.stderr +++ b/tests/ui/impl-trait/recursive-coroutine.stderr @@ -1,5 +1,5 @@ error[E0720]: cannot resolve opaque type - --> $DIR/recursive-generator.rs:5:13 + --> $DIR/recursive-coroutine.rs:5:13 | LL | fn foo() -> impl Coroutine { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type diff --git a/tests/ui/nll/generator-distinct-lifetime.rs b/tests/ui/nll/coroutine-distinct-lifetime.rs similarity index 100% rename from tests/ui/nll/generator-distinct-lifetime.rs rename to tests/ui/nll/coroutine-distinct-lifetime.rs diff --git a/tests/ui/nll/generator-upvar-mutability.rs b/tests/ui/nll/coroutine-upvar-mutability.rs similarity index 100% rename from tests/ui/nll/generator-upvar-mutability.rs rename to tests/ui/nll/coroutine-upvar-mutability.rs diff --git a/tests/ui/nll/generator-upvar-mutability.stderr b/tests/ui/nll/coroutine-upvar-mutability.stderr similarity index 88% rename from tests/ui/nll/generator-upvar-mutability.stderr rename to tests/ui/nll/coroutine-upvar-mutability.stderr index 31b061b61d1..464bbc76931 100644 --- a/tests/ui/nll/generator-upvar-mutability.stderr +++ b/tests/ui/nll/coroutine-upvar-mutability.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `x`, as it is not declared as mutable - --> $DIR/generator-upvar-mutability.rs:8:9 + --> $DIR/coroutine-upvar-mutability.rs:8:9 | LL | let x = 0; | - help: consider changing this to be mutable: `mut x` diff --git a/tests/ui/nll/issue-48623-generator.rs b/tests/ui/nll/issue-48623-coroutine.rs similarity index 100% rename from tests/ui/nll/issue-48623-generator.rs rename to tests/ui/nll/issue-48623-coroutine.rs diff --git a/tests/ui/nll/issue-48623-generator.stderr b/tests/ui/nll/issue-48623-coroutine.stderr similarity index 87% rename from tests/ui/nll/issue-48623-generator.stderr rename to tests/ui/nll/issue-48623-coroutine.stderr index 2806359efdc..1b7b1735aac 100644 --- a/tests/ui/nll/issue-48623-generator.stderr +++ b/tests/ui/nll/issue-48623-coroutine.stderr @@ -1,5 +1,5 @@ warning: unused coroutine that must be used - --> $DIR/issue-48623-generator.rs:15:5 + --> $DIR/issue-48623-coroutine.rs:15:5 | LL | move || { d; yield; &mut *r }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/polymorphization/generators.rs b/tests/ui/polymorphization/coroutine.rs similarity index 100% rename from tests/ui/polymorphization/generators.rs rename to tests/ui/polymorphization/coroutine.rs diff --git a/tests/ui/polymorphization/generators.stderr b/tests/ui/polymorphization/coroutine.stderr similarity index 91% rename from tests/ui/polymorphization/generators.stderr rename to tests/ui/polymorphization/coroutine.stderr index 41daba9c64f..67b55a59883 100644 --- a/tests/ui/polymorphization/generators.stderr +++ b/tests/ui/polymorphization/coroutine.stderr @@ -1,5 +1,5 @@ warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generators.rs:3:12 + --> $DIR/coroutine.rs:3:12 | LL | #![feature(generic_const_exprs, coroutines, coroutine_trait, rustc_attrs)] | ^^^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | #![feature(generic_const_exprs, coroutines, coroutine_trait, rustc_attrs)] = note: `#[warn(incomplete_features)]` on by default error: item has unused generic parameters - --> $DIR/generators.rs:35:5 + --> $DIR/coroutine.rs:35:5 | LL | pub fn unused_type() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin { | - generic parameter `T` is unused @@ -16,7 +16,7 @@ LL | || { | ^^ error: item has unused generic parameters - --> $DIR/generators.rs:60:5 + --> $DIR/coroutine.rs:60:5 | LL | pub fn unused_const() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin { | ------------ generic parameter `T` is unused diff --git a/tests/ui/print_type_sizes/generator.rs b/tests/ui/print_type_sizes/coroutine.rs similarity index 100% rename from tests/ui/print_type_sizes/generator.rs rename to tests/ui/print_type_sizes/coroutine.rs diff --git a/tests/ui/print_type_sizes/generator.stdout b/tests/ui/print_type_sizes/coroutine.stdout similarity index 88% rename from tests/ui/print_type_sizes/generator.stdout rename to tests/ui/print_type_sizes/coroutine.stdout index 6fe5d68e845..5d51339558c 100644 --- a/tests/ui/print_type_sizes/generator.stdout +++ b/tests/ui/print_type_sizes/coroutine.stdout @@ -1,4 +1,4 @@ -print-type-size type: `{coroutine@$DIR/generator.rs:10:5: 10:14}`: 8193 bytes, alignment: 1 bytes +print-type-size type: `{coroutine@$DIR/coroutine.rs:10:5: 10:14}`: 8193 bytes, alignment: 1 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 8192 bytes print-type-size upvar `.array`: 8192 bytes diff --git a/tests/ui/print_type_sizes/generator_discr_placement.rs b/tests/ui/print_type_sizes/coroutine_discr_placement.rs similarity index 100% rename from tests/ui/print_type_sizes/generator_discr_placement.rs rename to tests/ui/print_type_sizes/coroutine_discr_placement.rs diff --git a/tests/ui/print_type_sizes/generator_discr_placement.stdout b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout similarity index 89% rename from tests/ui/print_type_sizes/generator_discr_placement.stdout rename to tests/ui/print_type_sizes/coroutine_discr_placement.stdout index 00ca8f9dfdc..f34a8e9a706 100644 --- a/tests/ui/print_type_sizes/generator_discr_placement.stdout +++ b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout @@ -1,4 +1,4 @@ -print-type-size type: `{coroutine@$DIR/generator_discr_placement.rs:12:13: 12:15}`: 8 bytes, alignment: 4 bytes +print-type-size type: `{coroutine@$DIR/coroutine_discr_placement.rs:12:13: 12:15}`: 8 bytes, alignment: 4 bytes print-type-size discriminant: 1 bytes print-type-size variant `Unresumed`: 0 bytes print-type-size variant `Suspend0`: 7 bytes diff --git a/tests/ui/sanitize/issue-111184-generator-witness.rs b/tests/ui/sanitize/issue-111184-coroutine-witness.rs similarity index 100% rename from tests/ui/sanitize/issue-111184-generator-witness.rs rename to tests/ui/sanitize/issue-111184-coroutine-witness.rs diff --git a/tests/ui/traits/new-solver/generator.fail.stderr b/tests/ui/traits/new-solver/coroutine.fail.stderr similarity index 75% rename from tests/ui/traits/new-solver/generator.fail.stderr rename to tests/ui/traits/new-solver/coroutine.fail.stderr index 3728d2033de..14e67727d0b 100644 --- a/tests/ui/traits/new-solver/generator.fail.stderr +++ b/tests/ui/traits/new-solver/coroutine.fail.stderr @@ -1,5 +1,5 @@ -error[E0277]: the trait bound `{coroutine@$DIR/generator.rs:18:21: 18:23}: Coroutine` is not satisfied - --> $DIR/generator.rs:18:21 +error[E0277]: the trait bound `{coroutine@$DIR/coroutine.rs:18:21: 18:23}: Coroutine` is not satisfied + --> $DIR/coroutine.rs:18:21 | LL | needs_coroutine(|| { | _____---------------_^ @@ -10,16 +10,16 @@ LL | | LL | | LL | | yield (); LL | | }); - | |_____^ the trait `Coroutine` is not implemented for `{coroutine@$DIR/generator.rs:18:21: 18:23}` + | |_____^ the trait `Coroutine` is not implemented for `{coroutine@$DIR/coroutine.rs:18:21: 18:23}` | note: required by a bound in `needs_coroutine` - --> $DIR/generator.rs:14:28 + --> $DIR/coroutine.rs:14:28 | LL | fn needs_coroutine(_: impl Coroutine) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_coroutine` -error[E0271]: type mismatch resolving `<{coroutine@$DIR/generator.rs:18:21: 18:23} as Coroutine>::Yield == B` - --> $DIR/generator.rs:18:21 +error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:18:21: 18:23} as Coroutine>::Yield == B` + --> $DIR/coroutine.rs:18:21 | LL | needs_coroutine(|| { | _____---------------_^ @@ -33,13 +33,13 @@ LL | | }); | |_____^ types differ | note: required by a bound in `needs_coroutine` - --> $DIR/generator.rs:14:41 + --> $DIR/coroutine.rs:14:41 | LL | fn needs_coroutine(_: impl Coroutine) {} | ^^^^^^^^^ required by this bound in `needs_coroutine` -error[E0271]: type mismatch resolving `<{coroutine@$DIR/generator.rs:18:21: 18:23} as Coroutine>::Return == C` - --> $DIR/generator.rs:18:21 +error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:18:21: 18:23} as Coroutine>::Return == C` + --> $DIR/coroutine.rs:18:21 | LL | needs_coroutine(|| { | _____---------------_^ @@ -53,7 +53,7 @@ LL | | }); | |_____^ types differ | note: required by a bound in `needs_coroutine` - --> $DIR/generator.rs:14:52 + --> $DIR/coroutine.rs:14:52 | LL | fn needs_coroutine(_: impl Coroutine) {} | ^^^^^^^^^^ required by this bound in `needs_coroutine` diff --git a/tests/ui/traits/new-solver/generator.rs b/tests/ui/traits/new-solver/coroutine.rs similarity index 100% rename from tests/ui/traits/new-solver/generator.rs rename to tests/ui/traits/new-solver/coroutine.rs diff --git a/tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs similarity index 100% rename from tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs rename to tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs diff --git a/tests/ui/type-alias-impl-trait/issue-58662-generator-with-lifetime.rs b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs similarity index 100% rename from tests/ui/type-alias-impl-trait/issue-58662-generator-with-lifetime.rs rename to tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs diff --git a/tests/ui/type-alias-impl-trait/issue-94429.stderr b/tests/ui/type-alias-impl-trait/issue-94429.stderr index 01526bf43c6..360ecfa61bf 100644 --- a/tests/ui/type-alias-impl-trait/issue-94429.stderr +++ b/tests/ui/type-alias-impl-trait/issue-94429.stderr @@ -1,8 +1,8 @@ error[E0271]: type mismatch resolving `<{coroutine@$DIR/issue-94429.rs:17:9: 17:16} as Coroutine>::Yield == ()` --> $DIR/issue-94429.rs:15:26 | -LL | fn run(&mut self) -> Self::Gen { - | ^^^^^^^^^ expected integer, found `()` +LL | fn run(&mut self) -> Self::Coro { + | ^^^^^^^^^^ expected integer, found `()` error: aborting due to previous error