blob: ee378abcf2bad771e90f59711c185794001de7ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// run-pass
// issue #89688
fn example_let_else(value: Option<String>) {
let Some(inner) = value else {
println!("other: {:?}", value); // OK
return;
};
println!("inner: {}", inner);
}
fn main() {
example_let_else(Some("foo".into()));
example_let_else(None);
}
|