diff options
Diffstat (limited to 'tests/ui/impl-trait/bounds_regression.rs')
| -rw-r--r-- | tests/ui/impl-trait/bounds_regression.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/impl-trait/bounds_regression.rs b/tests/ui/impl-trait/bounds_regression.rs index 31fc46203d3..e73bf68f8f6 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; } @@ -10,14 +10,14 @@ pub trait FakeFuture { } pub fn future_from_generator< - T: FakeGenerator<Yield = ()> + 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; } |
