diff options
Diffstat (limited to 'tests/ui/coroutine/layout-error.rs')
| -rw-r--r-- | tests/ui/coroutine/layout-error.rs | 24 | 
1 files changed, 11 insertions, 13 deletions
| diff --git a/tests/ui/coroutine/layout-error.rs b/tests/ui/coroutine/layout-error.rs index 3e26cf17d29..6cf32134025 100644 --- a/tests/ui/coroutine/layout-error.rs +++ b/tests/ui/coroutine/layout-error.rs @@ -16,22 +16,20 @@ impl<F: Future> Task<F> { } } -mod helper { - use super::*; - pub type F = impl Future; - fn foo() - where - F:, - { - async fn cb() { - let a = Foo; //~ ERROR cannot find value `Foo` in this scope - } - - Task::spawn(&POOL, || cb()); +pub type F = impl Future; +#[define_opaque(F)] +fn foo() +where + F:, +{ + async fn cb() { + let a = Foo; //~ ERROR cannot find value `Foo` in this scope } + + Task::spawn(&POOL, || cb()); } // Check that statics are inhabited computes they layout. -static POOL: Task<helper::F> = Task::new(); +static POOL: Task<F> = Task::new(); fn main() {} | 
