+// check-fail
+
#![deny(non_exhaustive_omitted_patterns)]
-//~^ ERROR the `non_exhaustive_omitted_patterns` lint is unstable
-//~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable
+//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
+//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
#![allow(non_exhaustive_omitted_patterns)]
-//~^ ERROR the `non_exhaustive_omitted_patterns` lint is unstable
-//~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable
+//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
+//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
fn main() {
enum Foo {
}
#[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`
+ //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
match Foo::A {
Foo::A => {}
Foo::B => {}
}
- //~^^^^^ ERROR the `non_exhaustive_omitted_patterns` lint is unstable
- //~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable
- //~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable
- //~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable
+ //~^^^^ ERROR non-exhaustive patterns: `Foo::C` not covered
match Foo::A {
Foo::A => {}
#[warn(non_exhaustive_omitted_patterns)]
_ => {}
}
- //~^^^ ERROR the `non_exhaustive_omitted_patterns` lint is unstable
- //~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable
+ //~^^^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
+ //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
}