Skip to content

Commit

Permalink
Rollup merge of rust-lang#120540 - Fishrock123:test-try-block-in-matc…
Browse files Browse the repository at this point in the history
…h-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: rust-lang#31436
  • Loading branch information
matthiaskrgr committed Feb 1, 2024
2 parents 219b2da + bedd81e commit 433b519
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/ui/try-block/try-block-in-match-arm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// check-pass
// compile-flags: --edition 2018

#![feature(try_blocks)]

fn main() {
let _ = match 1 {
1 => try {}
_ => Ok::<(), ()>(()),
};
}

0 comments on commit 433b519

Please sign in to comment.