diff options
Diffstat (limited to 'tests/ui/macros/issue-84195-lint-anon-const.rs')
-rw-r--r-- | tests/ui/macros/issue-84195-lint-anon-const.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/macros/issue-84195-lint-anon-const.rs b/tests/ui/macros/issue-84195-lint-anon-const.rs new file mode 100644 index 000000000..71c768320 --- /dev/null +++ b/tests/ui/macros/issue-84195-lint-anon-const.rs @@ -0,0 +1,14 @@ +// Regression test for issue #84195 +// Checks that we properly fire lints that occur inside +// anon consts. + +#![deny(semicolon_in_expressions_from_macros)] + +macro_rules! len { + () => { 0; }; //~ ERROR trailing semicolon + //~| WARN this was previously accepted +} + +fn main() { + let val: [u8; len!()] = []; +} |