Rollup merge of #120540 - Fishrock123:test-try-block-in-match-arm, r=compiler-errors

add test for try-block-in-match-arm

This is noted as an implementation concern under the tracking issue for `?` and `try` blocks. (Issue 31436)

Refs: https://github.com/rust-lang/rust/issues/31436
This commit is contained in:
Matthias Krüger 2024-02-04 19:42:10 +01:00 committed by GitHub
commit 592beb1c25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,11 @@
// check-pass
// compile-flags: --edition 2018
#![feature(try_blocks)]
fn main() {
let _ = match 1 {
1 => try {}
_ => Ok::<(), ()>(()),
};
}