@@ -229,6 +229,7 @@ mod main_recursion;
229
229
mod manual_async_fn;
230
230
mod manual_non_exhaustive;
231
231
mod map_clone;
232
+ mod map_identity;
232
233
mod map_unit_fn;
233
234
mod match_on_vec_items;
234
235
mod matches;
@@ -459,7 +460,11 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
459
460
) ;
460
461
store. register_removed (
461
462
"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" ,
463
468
) ;
464
469
// end deprecated lints, do not remove this comment, it’s used in `update_lints`
465
470
@@ -473,6 +478,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
473
478
& assign_ops:: ASSIGN_OP_PATTERN ,
474
479
& assign_ops:: MISREFACTORED_ASSIGN_OP ,
475
480
& atomic_ordering:: INVALID_ATOMIC_ORDERING ,
481
+ & attrs:: BLANKET_CLIPPY_RESTRICTION_LINTS ,
476
482
& attrs:: DEPRECATED_CFG_ATTR ,
477
483
& attrs:: DEPRECATED_SEMVER ,
478
484
& attrs:: EMPTY_LINE_AFTER_OUTER_ATTR ,
@@ -608,6 +614,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
608
614
& manual_async_fn:: MANUAL_ASYNC_FN ,
609
615
& manual_non_exhaustive:: MANUAL_NON_EXHAUSTIVE ,
610
616
& map_clone:: MAP_CLONE ,
617
+ & map_identity:: MAP_IDENTITY ,
611
618
& map_unit_fn:: OPTION_MAP_UNIT_FN ,
612
619
& map_unit_fn:: RESULT_MAP_UNIT_FN ,
613
620
& match_on_vec_items:: MATCH_ON_VEC_ITEMS ,
@@ -752,7 +759,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
752
759
& reference:: DEREF_ADDROF ,
753
760
& reference:: REF_IN_DEREF ,
754
761
& regex:: INVALID_REGEX ,
755
- & regex:: REGEX_MACRO ,
756
762
& regex:: TRIVIAL_REGEX ,
757
763
& returns:: NEEDLESS_RETURN ,
758
764
& returns:: UNUSED_UNIT ,
@@ -1057,6 +1063,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1057
1063
} ) ;
1058
1064
store. register_early_pass ( || box unnested_or_patterns:: UnnestedOrPatterns ) ;
1059
1065
store. register_late_pass ( || box macro_use:: MacroUseImports :: default ( ) ) ;
1066
+ store. register_late_pass ( || box map_identity:: MapIdentity ) ;
1060
1067
1061
1068
store. register_group ( true , "clippy::restriction" , Some ( "clippy_restriction" ) , vec ! [
1062
1069
LintId :: of( & arithmetic:: FLOAT_ARITHMETIC ) ,
@@ -1186,6 +1193,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1186
1193
LintId :: of( & assign_ops:: ASSIGN_OP_PATTERN ) ,
1187
1194
LintId :: of( & assign_ops:: MISREFACTORED_ASSIGN_OP ) ,
1188
1195
LintId :: of( & atomic_ordering:: INVALID_ATOMIC_ORDERING ) ,
1196
+ LintId :: of( & attrs:: BLANKET_CLIPPY_RESTRICTION_LINTS ) ,
1189
1197
LintId :: of( & attrs:: DEPRECATED_CFG_ATTR ) ,
1190
1198
LintId :: of( & attrs:: DEPRECATED_SEMVER ) ,
1191
1199
LintId :: of( & attrs:: MISMATCHED_TARGET_OS ) ,
@@ -1273,6 +1281,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1273
1281
LintId :: of( & manual_async_fn:: MANUAL_ASYNC_FN ) ,
1274
1282
LintId :: of( & manual_non_exhaustive:: MANUAL_NON_EXHAUSTIVE ) ,
1275
1283
LintId :: of( & map_clone:: MAP_CLONE ) ,
1284
+ LintId :: of( & map_identity:: MAP_IDENTITY ) ,
1276
1285
LintId :: of( & map_unit_fn:: OPTION_MAP_UNIT_FN ) ,
1277
1286
LintId :: of( & map_unit_fn:: RESULT_MAP_UNIT_FN ) ,
1278
1287
LintId :: of( & matches:: INFALLIBLE_DESTRUCTURING_MATCH ) ,
@@ -1374,7 +1383,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1374
1383
LintId :: of( & reference:: DEREF_ADDROF ) ,
1375
1384
LintId :: of( & reference:: REF_IN_DEREF ) ,
1376
1385
LintId :: of( & regex:: INVALID_REGEX ) ,
1377
- LintId :: of( & regex:: REGEX_MACRO ) ,
1378
1386
LintId :: of( & regex:: TRIVIAL_REGEX ) ,
1379
1387
LintId :: of( & returns:: NEEDLESS_RETURN ) ,
1380
1388
LintId :: of( & returns:: UNUSED_UNIT ) ,
@@ -1437,6 +1445,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1437
1445
store. register_group ( true , "clippy::style" , Some ( "clippy_style" ) , vec ! [
1438
1446
LintId :: of( & assertions_on_constants:: ASSERTIONS_ON_CONSTANTS ) ,
1439
1447
LintId :: of( & assign_ops:: ASSIGN_OP_PATTERN ) ,
1448
+ LintId :: of( & attrs:: BLANKET_CLIPPY_RESTRICTION_LINTS ) ,
1440
1449
LintId :: of( & attrs:: UNKNOWN_CLIPPY_LINTS ) ,
1441
1450
LintId :: of( & bit_mask:: VERBOSE_BIT_MASK ) ,
1442
1451
LintId :: of( & blacklisted_name:: BLACKLISTED_NAME ) ,
@@ -1510,7 +1519,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1510
1519
LintId :: of( & redundant_field_names:: REDUNDANT_FIELD_NAMES ) ,
1511
1520
LintId :: of( & redundant_pattern_matching:: REDUNDANT_PATTERN_MATCHING ) ,
1512
1521
LintId :: of( & redundant_static_lifetimes:: REDUNDANT_STATIC_LIFETIMES ) ,
1513
- LintId :: of( & regex:: REGEX_MACRO ) ,
1514
1522
LintId :: of( & regex:: TRIVIAL_REGEX ) ,
1515
1523
LintId :: of( & returns:: NEEDLESS_RETURN ) ,
1516
1524
LintId :: of( & returns:: UNUSED_UNIT ) ,
@@ -1550,6 +1558,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1550
1558
LintId :: of( & loops:: EXPLICIT_COUNTER_LOOP ) ,
1551
1559
LintId :: of( & loops:: MUT_RANGE_BOUND ) ,
1552
1560
LintId :: of( & loops:: WHILE_LET_LOOP ) ,
1561
+ LintId :: of( & map_identity:: MAP_IDENTITY ) ,
1553
1562
LintId :: of( & map_unit_fn:: OPTION_MAP_UNIT_FN ) ,
1554
1563
LintId :: of( & map_unit_fn:: RESULT_MAP_UNIT_FN ) ,
1555
1564
LintId :: of( & matches:: MATCH_AS_REF ) ,
0 commit comments