mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 12:33:57 +00:00
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:
commit
592beb1c25
11
tests/ui/try-block/try-block-in-match-arm.rs
Normal file
11
tests/ui/try-block/try-block-in-match-arm.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
// check-pass
|
||||
// compile-flags: --edition 2018
|
||||
|
||||
#![feature(try_blocks)]
|
||||
|
||||
fn main() {
|
||||
let _ = match 1 {
|
||||
1 => try {}
|
||||
_ => Ok::<(), ()>(()),
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue