about summary refs log tree commit diff
path: root/tests/ui/lint/expr_attr_paren_order.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lint/expr_attr_paren_order.rs')
-rw-r--r--tests/ui/lint/expr_attr_paren_order.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/lint/expr_attr_paren_order.rs b/tests/ui/lint/expr_attr_paren_order.rs
new file mode 100644
index 00000000000..e1ec2e951cf
--- /dev/null
+++ b/tests/ui/lint/expr_attr_paren_order.rs
@@ -0,0 +1,22 @@
+#![feature(stmt_expr_attributes)]
+
+fn main() {
+
+    // Test that attributes on parens get concatenated
+    // in the expected order in the hir folder.
+
+    #[deny(non_snake_case)] #[allow(non_snake_case)] (
+        {
+            let X = 0;
+            let _ = X;
+        }
+    );
+
+    #[allow(non_snake_case)] #[deny(non_snake_case)] (
+        {
+            let X = 0; //~ ERROR snake case name
+            let _ = X;
+        }
+    );
+
+}