1 // Verifies that computing a layout of a generator tainted by type errors
2 // doesn't ICE. Regression test for #80998.
6 #![feature(type_alias_impl_trait)]
7 use std::future::Future;
9 pub struct Task<F: Future>(F);
10 impl<F: Future> Task<F> {
11 const fn new() -> Self {
14 fn spawn(&self, _: impl FnOnce() -> F) {
21 let a = Foo; //~ ERROR cannot find value `Foo` in this scope
25 // Check that statics are inhabited computes they layout.
26 static POOL: Task<F> = Task::new();
27 Task::spawn(&POOL, || cb());