diff options
Diffstat (limited to 'tests/ui/macros/recovery-forbidden.rs')
-rw-r--r-- | tests/ui/macros/recovery-forbidden.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/macros/recovery-forbidden.rs b/tests/ui/macros/recovery-forbidden.rs new file mode 100644 index 000000000..5dd261933 --- /dev/null +++ b/tests/ui/macros/recovery-forbidden.rs @@ -0,0 +1,13 @@ +// check-pass + +macro_rules! dont_recover_here { + ($e:expr) => { + compile_error!("Must not recover to single !1 expr"); + }; + + (not $a:literal) => {}; +} + +dont_recover_here! { not 1 } + +fn main() {} |