about summary refs log tree commit diff
path: root/tests/ui/macros/issue-84195-lint-anon-const.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/issue-84195-lint-anon-const.rs')
-rw-r--r--tests/ui/macros/issue-84195-lint-anon-const.rs14
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 00000000000..71c76832015
--- /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!()] = [];
+}