summaryrefslogtreecommitdiffstats
path: root/src/test/ui/let-else/issue-99975.rs
blob: 5b164f347e7dd8d6ba2dd5752b23b95fa2b9211a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-pass
// compile-flags: -C opt-level=3 -Zvalidate-mir



fn return_result() -> Option<String> {
    Some("ok".to_string())
}

fn start() -> String {
    let Some(content) = return_result() else {
        return "none".to_string()
    };

    content
}

fn main() {
    start();
}