|
1 | 1 | // error-pattern:cargo-clippy |
2 | 2 |
|
| 3 | +#![feature(bindings_after_at)] |
3 | 4 | #![feature(box_syntax)] |
4 | 5 | #![feature(box_patterns)] |
5 | 6 | #![feature(or_patterns)] |
|
12 | 13 | #![cfg_attr(feature = "deny-warnings", deny(warnings))] |
13 | 14 | #![feature(crate_visibility_modifier)] |
14 | 15 | #![feature(concat_idents)] |
| 16 | +#![feature(drain_filter)] |
15 | 17 |
|
16 | 18 | // FIXME: switch to something more ergonomic here, once available. |
17 | 19 | // (Currently there is no way to opt into sysroot crates without `extern crate`.) |
@@ -319,6 +321,7 @@ mod types; |
319 | 321 | mod unicode; |
320 | 322 | mod unnamed_address; |
321 | 323 | mod unnecessary_sort_by; |
| 324 | +mod unnested_or_patterns; |
322 | 325 | mod unsafe_removed_from_name; |
323 | 326 | mod unused_io_amount; |
324 | 327 | mod unused_self; |
@@ -836,6 +839,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: |
836 | 839 | &unnamed_address::FN_ADDRESS_COMPARISONS, |
837 | 840 | &unnamed_address::VTABLE_ADDRESS_COMPARISONS, |
838 | 841 | &unnecessary_sort_by::UNNECESSARY_SORT_BY, |
| 842 | + &unnested_or_patterns::UNNESTED_OR_PATTERNS, |
839 | 843 | &unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME, |
840 | 844 | &unused_io_amount::UNUSED_IO_AMOUNT, |
841 | 845 | &unused_self::UNUSED_SELF, |
@@ -1073,6 +1077,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: |
1073 | 1077 | store.register_early_pass(move || box non_expressive_names::NonExpressiveNames { |
1074 | 1078 | single_char_binding_names_threshold, |
1075 | 1079 | }); |
| 1080 | + store.register_early_pass(|| box unnested_or_patterns::UnnestedOrPatterns); |
1076 | 1081 |
|
1077 | 1082 | store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![ |
1078 | 1083 | LintId::of(&arithmetic::FLOAT_ARITHMETIC), |
@@ -1433,6 +1438,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: |
1433 | 1438 | LintId::of(&unnamed_address::FN_ADDRESS_COMPARISONS), |
1434 | 1439 | LintId::of(&unnamed_address::VTABLE_ADDRESS_COMPARISONS), |
1435 | 1440 | LintId::of(&unnecessary_sort_by::UNNECESSARY_SORT_BY), |
| 1441 | + LintId::of(&unnested_or_patterns::UNNESTED_OR_PATTERNS), |
1436 | 1442 | LintId::of(&unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME), |
1437 | 1443 | LintId::of(&unused_io_amount::UNUSED_IO_AMOUNT), |
1438 | 1444 | LintId::of(&unwrap::PANICKING_UNWRAP), |
@@ -1616,6 +1622,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: |
1616 | 1622 | LintId::of(&types::UNNECESSARY_CAST), |
1617 | 1623 | LintId::of(&types::VEC_BOX), |
1618 | 1624 | LintId::of(&unnecessary_sort_by::UNNECESSARY_SORT_BY), |
| 1625 | + LintId::of(&unnested_or_patterns::UNNESTED_OR_PATTERNS), |
1619 | 1626 | LintId::of(&unwrap::UNNECESSARY_UNWRAP), |
1620 | 1627 | LintId::of(&useless_conversion::USELESS_CONVERSION), |
1621 | 1628 | LintId::of(&zero_div_zero::ZERO_DIVIDED_BY_ZERO), |
|
0 commit comments