@@ -229,6 +229,7 @@ mod main_recursion;
229229mod manual_async_fn;
230230mod manual_non_exhaustive;
231231mod map_clone;
232+ mod map_identity;
232233mod map_unit_fn;
233234mod match_on_vec_items;
234235mod matches;
@@ -459,7 +460,11 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
459460 ) ;
460461 store. register_removed (
461462 "clippy::replace_consts" ,
462- "associated-constants `MIN`/`MAX` of integers are prefer to `{min,max}_value()` and module constants" ,
463+ "associated-constants `MIN`/`MAX` of integers are prefered to `{min,max}_value()` and module constants" ,
464+ ) ;
465+ store. register_removed (
466+ "clippy::regex_macro" ,
467+ "the regex! macro has been removed from the regex crate in 2018" ,
463468 ) ;
464469 // end deprecated lints, do not remove this comment, it’s used in `update_lints`
465470
@@ -473,6 +478,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
473478 & assign_ops:: ASSIGN_OP_PATTERN ,
474479 & assign_ops:: MISREFACTORED_ASSIGN_OP ,
475480 & atomic_ordering:: INVALID_ATOMIC_ORDERING ,
481+ & attrs:: BLANKET_CLIPPY_RESTRICTION_LINTS ,
476482 & attrs:: DEPRECATED_CFG_ATTR ,
477483 & attrs:: DEPRECATED_SEMVER ,
478484 & attrs:: EMPTY_LINE_AFTER_OUTER_ATTR ,
@@ -608,6 +614,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
608614 & manual_async_fn:: MANUAL_ASYNC_FN ,
609615 & manual_non_exhaustive:: MANUAL_NON_EXHAUSTIVE ,
610616 & map_clone:: MAP_CLONE ,
617+ & map_identity:: MAP_IDENTITY ,
611618 & map_unit_fn:: OPTION_MAP_UNIT_FN ,
612619 & map_unit_fn:: RESULT_MAP_UNIT_FN ,
613620 & match_on_vec_items:: MATCH_ON_VEC_ITEMS ,
@@ -752,7 +759,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
752759 & reference:: DEREF_ADDROF ,
753760 & reference:: REF_IN_DEREF ,
754761 & regex:: INVALID_REGEX ,
755- & regex:: REGEX_MACRO ,
756762 & regex:: TRIVIAL_REGEX ,
757763 & returns:: NEEDLESS_RETURN ,
758764 & returns:: UNUSED_UNIT ,
@@ -1057,6 +1063,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10571063 } ) ;
10581064 store. register_early_pass ( || box unnested_or_patterns:: UnnestedOrPatterns ) ;
10591065 store. register_late_pass ( || box macro_use:: MacroUseImports :: default ( ) ) ;
1066+ store. register_late_pass ( || box map_identity:: MapIdentity ) ;
10601067
10611068 store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
10621069 LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
@@ -1186,6 +1193,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11861193 LintId :: of( & assign_ops:: ASSIGN_OP_PATTERN ) ,
11871194 LintId :: of( & assign_ops:: MISREFACTORED_ASSIGN_OP ) ,
11881195 LintId :: of( & atomic_ordering:: INVALID_ATOMIC_ORDERING ) ,
1196+ LintId :: of( & attrs:: BLANKET_CLIPPY_RESTRICTION_LINTS ) ,
11891197 LintId :: of( & attrs:: DEPRECATED_CFG_ATTR ) ,
11901198 LintId :: of( & attrs:: DEPRECATED_SEMVER ) ,
11911199 LintId :: of( & attrs:: MISMATCHED_TARGET_OS ) ,
@@ -1273,6 +1281,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12731281 LintId :: of( & manual_async_fn:: MANUAL_ASYNC_FN ) ,
12741282 LintId :: of( & manual_non_exhaustive:: MANUAL_NON_EXHAUSTIVE ) ,
12751283 LintId :: of( & map_clone:: MAP_CLONE ) ,
1284+ LintId :: of( & map_identity:: MAP_IDENTITY ) ,
12761285 LintId :: of( & map_unit_fn:: OPTION_MAP_UNIT_FN ) ,
12771286 LintId :: of( & map_unit_fn:: RESULT_MAP_UNIT_FN ) ,
12781287 LintId :: of( & matches:: INFALLIBLE_DESTRUCTURING_MATCH ) ,
@@ -1374,7 +1383,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13741383 LintId :: of( & reference:: DEREF_ADDROF ) ,
13751384 LintId :: of( & reference:: REF_IN_DEREF ) ,
13761385 LintId :: of( & regex:: INVALID_REGEX ) ,
1377- LintId :: of( & regex:: REGEX_MACRO ) ,
13781386 LintId :: of( & regex:: TRIVIAL_REGEX ) ,
13791387 LintId :: of( & returns:: NEEDLESS_RETURN ) ,
13801388 LintId :: of( & returns:: UNUSED_UNIT ) ,
@@ -1437,6 +1445,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14371445 store. register_group ( true , "clippy::style" , Some ( "clippy_style" ) , vec ! [
14381446 LintId :: of( & assertions_on_constants:: ASSERTIONS_ON_CONSTANTS ) ,
14391447 LintId :: of( & assign_ops:: ASSIGN_OP_PATTERN ) ,
1448+ LintId :: of( & attrs:: BLANKET_CLIPPY_RESTRICTION_LINTS ) ,
14401449 LintId :: of( & attrs:: UNKNOWN_CLIPPY_LINTS ) ,
14411450 LintId :: of( & bit_mask:: VERBOSE_BIT_MASK ) ,
14421451 LintId :: of( & blacklisted_name:: BLACKLISTED_NAME ) ,
@@ -1510,7 +1519,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15101519 LintId :: of( & redundant_field_names:: REDUNDANT_FIELD_NAMES ) ,
15111520 LintId :: of( & redundant_pattern_matching:: REDUNDANT_PATTERN_MATCHING ) ,
15121521 LintId :: of( & redundant_static_lifetimes:: REDUNDANT_STATIC_LIFETIMES ) ,
1513- LintId :: of( & regex:: REGEX_MACRO ) ,
15141522 LintId :: of( & regex:: TRIVIAL_REGEX ) ,
15151523 LintId :: of( & returns:: NEEDLESS_RETURN ) ,
15161524 LintId :: of( & returns:: UNUSED_UNIT ) ,
@@ -1550,6 +1558,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15501558 LintId :: of( & loops:: EXPLICIT_COUNTER_LOOP ) ,
15511559 LintId :: of( & loops:: MUT_RANGE_BOUND ) ,
15521560 LintId :: of( & loops:: WHILE_LET_LOOP ) ,
1561+ LintId :: of( & map_identity:: MAP_IDENTITY ) ,
15531562 LintId :: of( & map_unit_fn:: OPTION_MAP_UNIT_FN ) ,
15541563 LintId :: of( & map_unit_fn:: RESULT_MAP_UNIT_FN ) ,
15551564 LintId :: of( & matches:: MATCH_AS_REF ) ,
0 commit comments