]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
0531ce1d XL |
2 | // Regression test for #49685: drop elaboration was not revealing the |
3 | // value of `impl Trait` returns, leading to an ICE. | |
223e47cc | 4 | |
0531ce1d XL |
5 | fn main() { |
6 | let _ = Some(()) | |
7 | .into_iter() | |
8 | .flat_map(|_| Some(()).into_iter().flat_map(func)); | |
1a4d82fc | 9 | } |
223e47cc | 10 | |
0531ce1d XL |
11 | fn func(_: ()) -> impl Iterator<Item = ()> { |
12 | Some(()).into_iter().flat_map(|_| vec![]) | |
223e47cc | 13 | } |