rust/tests/target/let_else.rs

38 lines
615 B
Rust
Raw Normal View History

2023-01-16 11:19:47 -06:00
fn main() {
let Some(x) = opt else { return };
let Some(x) = opt else {
return;
};
let Some(x) = opt else {
// nope
return;
};
let Some(x) = y.foo(
"abc",
fairly_long_identifier,
"def",
"123456",
"string",
"cheese",
) else {
bar()
};
let Some(x) = abcdef()
.foo(
"abc",
some_really_really_really_long_ident,
"ident",
"123456",
)
.bar()
.baz()
.qux("fffffffffffffffff")
else {
foo_bar()
};
2023-01-16 11:19:47 -06:00
}