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
9 #![feature(type_alias_impl_trait)]
10 #![feature(generator_trait)]
12 extern crate metadata_sufficient_for_layout;
14 use std::ops::Generator;
16 type F = impl Generator<(), Yield = (), Return = ()>;
18 // Static queries the layout of the generator.
19 static A: Option<F> = None;
21 fn f() -> F { metadata_sufficient_for_layout::g() }