diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-10-14 18:25:10 +0200 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-10-14 19:39:18 +0200 |
| commit | ca869e33341ced8335c1288232c847a377a8653b (patch) | |
| tree | 4b631e8f2f7f7c6f580ef174d438bc8b5188f29c /tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs | |
| parent | 2d45df3caa22f5aef24564ad27de866ab8b5b254 (diff) | |
| download | rust-ca869e33341ced8335c1288232c847a377a8653b.tar.gz rust-ca869e33341ced8335c1288232c847a377a8653b.zip | |
Lint `non_exhaustive_omitted_patterns` per column
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs')
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs index 240dd90f70d..1922bfb4913 100644 --- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs +++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs @@ -3,9 +3,11 @@ #![deny(non_exhaustive_omitted_patterns)] //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` +//~| WARNING unknown lint: `non_exhaustive_omitted_patterns` #![allow(non_exhaustive_omitted_patterns)] //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` +//~| WARNING unknown lint: `non_exhaustive_omitted_patterns` fn main() { enum Foo { @@ -19,17 +21,19 @@ fn main() { //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` + //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` match Foo::A { + //~^ ERROR non-exhaustive patterns: `Foo::C` not covered Foo::A => {} Foo::B => {} } - //~^^^^ ERROR non-exhaustive patterns: `Foo::C` not covered #[warn(non_exhaustive_omitted_patterns)] //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` + //~| WARNING unknown lint: `non_exhaustive_omitted_patterns` match Foo::A { Foo::A => {} Foo::B => {} |
