]> git.lizzy.rs Git - rust.git/blob - src/test/ui/let-else/issue-102317.rs
Auto merge of #89123 - the8472:push_in_capacity, r=amanieu
[rust.git] / src / test / ui / let-else / issue-102317.rs
1 // issue #102317
2 // build-pass
3 // compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir
4
5 struct SegmentJob;
6
7 impl Drop for SegmentJob {
8     fn drop(&mut self) {}
9 }
10
11 pub async fn run() -> Result<(), ()> {
12     let jobs = Vec::<SegmentJob>::new();
13     let Some(_job) = jobs.into_iter().next() else {
14         return Ok(())
15     };
16
17     Ok(())
18 }
19
20 fn main() {}