summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/forbid-group-member.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/forbid-group-member.rs')
-rw-r--r--src/test/ui/lint/forbid-group-member.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/lint/forbid-group-member.rs b/src/test/ui/lint/forbid-group-member.rs
new file mode 100644
index 000000000..664edeaa8
--- /dev/null
+++ b/src/test/ui/lint/forbid-group-member.rs
@@ -0,0 +1,17 @@
+// Check what happens when we forbid a group but
+// then allow a member of that group.
+//
+// check-pass
+
+#![forbid(unused)]
+
+#[allow(unused_variables)]
+//~^ WARNING incompatible with previous forbid
+//~| WARNING previously accepted
+//~| WARNING incompatible with previous forbid
+//~| WARNING previously accepted
+//~| WARNING incompatible with previous forbid
+//~| WARNING previously accepted
+fn main() {
+ let a: ();
+}