about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr41
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr15
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs6
3 files changed, 57 insertions, 5 deletions
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr
index c58b07d1aef..b0629c6de1a 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr
@@ -26,5 +26,44 @@ note: the lint level is defined here
 LL |     #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 2 previous errors
+error: the `non_exhaustive_omitted_pattern` lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:34:9
+   |
+LL |         _ => {}
+   |         ^
+   |
+   = help: it used to make sense to set the lint level on an individual match arm, but that is no longer the case
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:33:16
+   |
+LL |         #[deny(non_exhaustive_omitted_patterns)]
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `non_exhaustive_omitted_pattern` lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:41:9
+   |
+LL |         _ => {}
+   |         ^
+   |
+   = help: it used to make sense to set the lint level on an individual match arm, but that is no longer the case
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:40:31
+   |
+LL |         #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the `non_exhaustive_omitted_pattern` lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:48:9
+   |
+LL |         _ => {}
+   |         ^
+   |
+   = help: it used to make sense to set the lint level on an individual match arm, but that is no longer the case
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:47:31
+   |
+LL |         #[cfg_attr(lint, warn(non_exhaustive_omitted_patterns))]
+   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors; 1 warning emitted
 
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
index 2d94a09de63..a7a2ad3a5f0 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
@@ -12,5 +12,18 @@ note: the lint level is defined here
 LL |     #[deny(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to previous error
+error: the `non_exhaustive_omitted_pattern` lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:34:9
+   |
+LL |         _ => {}
+   |         ^
+   |
+   = help: it used to make sense to set the lint level on an individual match arm, but that is no longer the case
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:33:16
+   |
+LL |         #[deny(non_exhaustive_omitted_patterns)]
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs
index 9411d8f085b..ac7b7cd93fd 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs
@@ -31,20 +31,20 @@ fn main() {
         NonExhaustiveEnum::Unit => {}
         NonExhaustiveEnum::Tuple(_) => {}
         #[deny(non_exhaustive_omitted_patterns)]
-        _ => {}
+        _ => {} //~ ERROR lint level must be set on the whole match
     }
 
     match val {
         NonExhaustiveEnum::Unit => {}
         NonExhaustiveEnum::Tuple(_) => {}
         #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
-        _ => {}
+        _ => {} //[lint]~ ERROR lint level must be set on the whole match
     }
 
     match val {
         NonExhaustiveEnum::Unit => {}
         NonExhaustiveEnum::Tuple(_) => {}
         #[cfg_attr(lint, warn(non_exhaustive_omitted_patterns))]
-        _ => {}
+        _ => {} //[lint]~ WARN lint level must be set on the whole match
     }
 }