1 // Check that the layout of a generator is available when auxiliary crate
2 // is compiled with --emit metadata.
4 // Regression test for #80998.
6 // aux-build:metadata-sufficient-for-layout.rs
8 #![feature(type_alias_impl_trait, rustc_attrs)]
9 #![feature(generator_trait)]
11 extern crate metadata_sufficient_for_layout;
13 use std::ops::Generator;
15 type F = impl Generator<(), Yield = (), Return = ()>;
17 // Static queries the layout of the generator.
18 static A: Option<F> = None;
21 metadata_sufficient_for_layout::g()
25 fn main() {} //~ ERROR