rust/tests/ui/let-else/issue-100103.rs
2024-02-16 20:02:50 +00:00

16 lines
195 B
Rust

//@ edition:2021
//@ check-pass
#![feature(try_blocks)]
fn main() {
let _: Result<i32, i32> = try {
let Some(x) = Some(0) else {
Err(1)?
};
x
};
}