summaryrefslogtreecommitdiffstats
path: root/src/test/ui/let-else/issue-102317.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/let-else/issue-102317.rs')
-rw-r--r--src/test/ui/let-else/issue-102317.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/let-else/issue-102317.rs b/src/test/ui/let-else/issue-102317.rs
new file mode 100644
index 000000000..7369b4938
--- /dev/null
+++ b/src/test/ui/let-else/issue-102317.rs
@@ -0,0 +1,20 @@
+// issue #102317
+// build-pass
+// compile-flags: --edition 2021 -C opt-level=3 -Zvalidate-mir
+
+struct SegmentJob;
+
+impl Drop for SegmentJob {
+ fn drop(&mut self) {}
+}
+
+pub async fn run() -> Result<(), ()> {
+ let jobs = Vec::<SegmentJob>::new();
+ let Some(_job) = jobs.into_iter().next() else {
+ return Ok(())
+ };
+
+ Ok(())
+}
+
+fn main() {}