]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issue-49685.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / issue-49685.rs
1 // run-pass
2 // Regression test for #49685: drop elaboration was not revealing the
3 // value of `impl Trait` returns, leading to an ICE.
4
5 fn main() {
6 let _ = Some(())
7 .into_iter()
8 .flat_map(|_| Some(()).into_iter().flat_map(func));
9 }
10
11 fn func(_: ()) -> impl Iterator<Item = ()> {
12 Some(()).into_iter().flat_map(|_| vec![])
13 }