diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/impl-trait/bounds_regression.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/impl-trait/bounds_regression.rs b/tests/ui/impl-trait/bounds_regression.rs index 31fc46203..f32d83c0c 100644 --- a/tests/ui/impl-trait/bounds_regression.rs +++ b/tests/ui/impl-trait/bounds_regression.rs @@ -1,6 +1,6 @@ // run-pass -pub trait FakeGenerator { +pub trait FakeCoroutine { type Yield; type Return; } @@ -9,15 +9,15 @@ pub trait FakeFuture { type Output; } -pub fn future_from_generator< - T: FakeGenerator<Yield = ()> +pub fn future_from_coroutine< + T: FakeCoroutine<Yield = ()> >(x: T) -> impl FakeFuture<Output = T::Return> { GenFuture(x) } -struct GenFuture<T: FakeGenerator<Yield = ()>>(#[allow(unused_tuple_struct_fields)] T); +struct GenFuture<T: FakeCoroutine<Yield = ()>>(#[allow(unused_tuple_struct_fields)] T); -impl<T: FakeGenerator<Yield = ()>> FakeFuture for GenFuture<T> { +impl<T: FakeCoroutine<Yield = ()>> FakeFuture for GenFuture<T> { type Output = T::Return; } |