diff options
Diffstat (limited to 'tests/ui/panics/panic-parens.rs')
-rw-r--r-- | tests/ui/panics/panic-parens.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/panics/panic-parens.rs b/tests/ui/panics/panic-parens.rs new file mode 100644 index 000000000..59ab54446 --- /dev/null +++ b/tests/ui/panics/panic-parens.rs @@ -0,0 +1,20 @@ +// Fail macros without arguments need to be disambiguated in +// certain positions + +// run-fail +// error-pattern:oops +// ignore-emscripten no processes + +fn bigpanic() { + while (panic!("oops")) { + if (panic!()) { + match (panic!()) { + () => {} + } + } + } +} + +fn main() { + bigpanic(); +} |