Skip to content

Commit 15468eb

Browse files
committed
Rename Gen to Coro in tests
1 parent 507595c commit 15468eb

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

tests/ui/generator/issue-87142.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
use std::ops::Coroutine;
1111

1212
pub trait CoroutineProviderAlt: Sized {
13-
type Gen: Coroutine<(), Return = (), Yield = ()>;
13+
type Coro: Coroutine<(), Return = (), Yield = ()>;
1414

15-
fn start(ctx: Context<Self>) -> Self::Gen;
15+
fn start(ctx: Context<Self>) -> Self::Coro;
1616
}
1717

1818
pub struct Context<G: 'static + CoroutineProviderAlt> {
19-
pub link: Box<G::Gen>,
19+
pub link: Box<G::Coro>,
2020
}
2121

2222
impl CoroutineProviderAlt for () {
23-
type Gen = impl Coroutine<(), Return = (), Yield = ()>;
24-
fn start(ctx: Context<Self>) -> Self::Gen {
23+
type Coro = impl Coroutine<(), Return = (), Yield = ()>;
24+
fn start(ctx: Context<Self>) -> Self::Coro {
2525
move || {
2626
match ctx {
2727
_ => (),

tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
mod gen {
77
use std::ops::Coroutine;
88

9-
pub type GenOnce<Y, R> = impl Coroutine<Yield = Y, Return = R>;
9+
pub type CoroOnce<Y, R> = impl Coroutine<Yield = Y, Return = R>;
1010

11-
pub const fn const_coroutine<Y, R>(yielding: Y, returning: R) -> GenOnce<Y, R> {
11+
pub const fn const_coroutine<Y, R>(yielding: Y, returning: R) -> CoroOnce<Y, R> {
1212
move || {
1313
yield yielding;
1414

@@ -17,6 +17,6 @@ mod gen {
1717
}
1818
}
1919

20-
const FOO: gen::GenOnce<usize, usize> = gen::const_coroutine(10, 100);
20+
const FOO: gen::CoroOnce<usize, usize> = gen::const_coroutine(10, 100);
2121

2222
fn main() {}

tests/ui/type-alias-impl-trait/issue-94429.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
use std::ops::Coroutine;
33

44
trait Runnable {
5-
type Gen: Coroutine<Yield = (), Return = ()>;
5+
type Coro: Coroutine<Yield = (), Return = ()>;
66

7-
fn run(&mut self) -> Self::Gen;
7+
fn run(&mut self) -> Self::Coro;
88
}
99

1010
struct Implementor {}
1111

1212
impl Runnable for Implementor {
13-
type Gen = impl Coroutine<Yield = (), Return = ()>;
13+
type Coro = impl Coroutine<Yield = (), Return = ()>;
1414

15-
fn run(&mut self) -> Self::Gen {
15+
fn run(&mut self) -> Self::Coro {
1616
//~^ ERROR: type mismatch resolving
1717
move || {
1818
yield 1;

0 commit comments

Comments
 (0)