]> git.lizzy.rs Git - rust.git/blob - tests/ui/debuginfo/issue-105386-debuginfo-ub.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / debuginfo / issue-105386-debuginfo-ub.rs
1 // run-pass
2 // compile-flags: --edition 2021 -Copt-level=3 -Cdebuginfo=2 -Zmir-opt-level=3
3
4 fn main() {
5     TranslatorI.visit_pre();
6 }
7
8 impl TranslatorI {
9     fn visit_pre(self) {
10         Some(())
11             .map(|_| self.flags())
12             .unwrap_or_else(|| self.flags());
13     }
14 }
15
16 struct TranslatorI;
17
18 impl TranslatorI {
19     fn flags(&self) {}
20 }