2022-09-05 14:17:41 +08:00
|
|
|
// run-pass
|
|
|
|
// compile-flags: -C opt-level=3 -Zvalidate-mir
|
|
|
|
|
2022-02-27 07:08:31 +01:00
|
|
|
|
2022-09-05 14:17:41 +08:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|