about summary refs log tree commit diff
path: root/tests/ui/lint/lint-change-warnings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lint/lint-change-warnings.rs')
-rw-r--r--tests/ui/lint/lint-change-warnings.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/lint/lint-change-warnings.rs b/tests/ui/lint/lint-change-warnings.rs
new file mode 100644
index 00000000000..37af3b7612c
--- /dev/null
+++ b/tests/ui/lint/lint-change-warnings.rs
@@ -0,0 +1,21 @@
+#![deny(warnings)]
+#![allow(dead_code)]
+
+fn main() {
+    while true {} //~ ERROR: infinite
+}
+
+#[allow(warnings)]
+fn foo() {
+    while true {}
+}
+
+#[warn(warnings)]
+fn bar() {
+    while true {} //~ WARNING: infinite
+}
+
+#[forbid(warnings)]
+fn baz() {
+    while true {} //~ ERROR: infinite
+}