diff options
| author | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2024-01-31 16:58:35 -0800 |
|---|---|---|
| committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2024-02-01 10:36:34 -0800 |
| commit | bedd81ef2afdf5979e316cde4c664bd13d49b266 (patch) | |
| tree | 33eb4921fbb2d9e5d35e2d8b4bb61410bd27c796 | |
| parent | 11f32b73e0dc9287e305b5b9980d24aecdc8c17f (diff) | |
| download | rust-bedd81ef2afdf5979e316cde4c664bd13d49b266.tar.gz rust-bedd81ef2afdf5979e316cde4c664bd13d49b266.zip | |
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)
| -rw-r--r-- | tests/ui/try-block/try-block-in-match-arm.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/try-block/try-block-in-match-arm.rs b/tests/ui/try-block/try-block-in-match-arm.rs new file mode 100644 index 00000000000..ea004ebe29f --- /dev/null +++ b/tests/ui/try-block/try-block-in-match-arm.rs @@ -0,0 +1,11 @@ +// check-pass +// compile-flags: --edition 2018 + +#![feature(try_blocks)] + +fn main() { + let _ = match 1 { + 1 => try {} + _ => Ok::<(), ()>(()), + }; +} |
