diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/impl-trait/issues/issue-58504.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/impl-trait/issues/issue-58504.rs b/tests/ui/impl-trait/issues/issue-58504.rs index e5865d0df..03b51ae92 100644 --- a/tests/ui/impl-trait/issues/issue-58504.rs +++ b/tests/ui/impl-trait/issues/issue-58504.rs @@ -1,12 +1,12 @@ -#![feature(generators, generator_trait, never_type)] +#![feature(coroutines, coroutine_trait, never_type)] -use std::ops::Generator; +use std::ops::Coroutine; -fn mk_gen() -> impl Generator<Return=!, Yield=()> { +fn mk_gen() -> impl Coroutine<Return=!, Yield=()> { || { loop { yield; } } } fn main() { - let gens: [impl Generator<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ]; - //~^ `impl Trait` only allowed in function and inherent method return types + let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ]; + //~^ `impl Trait` only allowed in function and inherent method argument and return types } |