]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generator/metadata-sufficient-for-layout.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / generator / metadata-sufficient-for-layout.rs
CommitLineData
5869c6ff
XL
1// Check that the layout of a generator is available when auxiliary crate
2// is compiled with --emit metadata.
3//
4// Regression test for #80998.
5//
6// aux-build:metadata-sufficient-for-layout.rs
5869c6ff 7
94222f64 8#![feature(type_alias_impl_trait, rustc_attrs)]
5869c6ff
XL
9#![feature(generator_trait)]
10
11extern crate metadata_sufficient_for_layout;
12
13use std::ops::Generator;
14
15type F = impl Generator<(), Yield = (), Return = ()>;
16
17// Static queries the layout of the generator.
18static A: Option<F> = None;
19
136023e0
XL
20fn f() -> F {
21 metadata_sufficient_for_layout::g()
22}
5869c6ff 23
6a06907d 24#[rustc_error]
136023e0 25fn main() {} //~ ERROR