Skip to content

Commit

Permalink
Unrolled build for rust-lang#120540
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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: rust-lang#31436
  • Loading branch information
rust-timer committed Feb 5, 2024
2 parents 268dbbb + bedd81e commit 8ec978a
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 8ec978a

Please sign in to comment.