about summary refs log tree commit diff
path: root/tests/ui/debuginfo/issue-105386-debuginfo-ub.rs
blob: e926a337659c18d0eda5f117a58907934513a78b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ run-pass
//@ compile-flags: -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3
//@ edition: 2021

fn main() {
    TranslatorI.visit_pre();
}

impl TranslatorI {
    fn visit_pre(self) {
        Some(())
            .map(|_| self.flags())
            .unwrap_or_else(|| self.flags());
    }
}

struct TranslatorI;

impl TranslatorI {
    fn flags(&self) {}
}