@@ -218,7 +218,6 @@ mod large_const_arrays;
218
218
mod large_enum_variant;
219
219
mod large_stack_arrays;
220
220
mod len_zero;
221
- mod let_and_return;
222
221
mod let_if_seq;
223
222
mod let_underscore;
224
223
mod lifetimes;
@@ -311,6 +310,7 @@ mod unnested_or_patterns;
311
310
mod unsafe_removed_from_name;
312
311
mod unused_io_amount;
313
312
mod unused_self;
313
+ mod unused_unit;
314
314
mod unwrap;
315
315
mod use_self;
316
316
mod useless_conversion;
@@ -587,7 +587,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
587
587
& large_stack_arrays:: LARGE_STACK_ARRAYS ,
588
588
& len_zero:: LEN_WITHOUT_IS_EMPTY ,
589
589
& len_zero:: LEN_ZERO ,
590
- & let_and_return:: LET_AND_RETURN ,
591
590
& let_if_seq:: USELESS_LET_IF_SEQ ,
592
591
& let_underscore:: LET_UNDERSCORE_LOCK ,
593
592
& let_underscore:: LET_UNDERSCORE_MUST_USE ,
@@ -771,8 +770,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
771
770
& regex:: INVALID_REGEX ,
772
771
& regex:: TRIVIAL_REGEX ,
773
772
& repeat_once:: REPEAT_ONCE ,
773
+ & returns:: LET_AND_RETURN ,
774
774
& returns:: NEEDLESS_RETURN ,
775
- & returns:: UNUSED_UNIT ,
776
775
& serde_api:: SERDE_API_MISUSE ,
777
776
& shadow:: SHADOW_REUSE ,
778
777
& shadow:: SHADOW_SAME ,
@@ -843,6 +842,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
843
842
& unsafe_removed_from_name:: UNSAFE_REMOVED_FROM_NAME ,
844
843
& unused_io_amount:: UNUSED_IO_AMOUNT ,
845
844
& unused_self:: UNUSED_SELF ,
845
+ & unused_unit:: UNUSED_UNIT ,
846
846
& unwrap:: PANICKING_UNWRAP ,
847
847
& unwrap:: UNNECESSARY_UNWRAP ,
848
848
& use_self:: USE_SELF ,
@@ -1029,8 +1029,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1029
1029
store. register_early_pass ( || box misc_early:: MiscEarlyLints ) ;
1030
1030
store. register_early_pass ( || box redundant_closure_call:: RedundantClosureCall ) ;
1031
1031
store. register_late_pass ( || box redundant_closure_call:: RedundantClosureCall ) ;
1032
- store. register_early_pass ( || box returns :: Return ) ;
1033
- store. register_late_pass ( || box let_and_return :: LetReturn ) ;
1032
+ store. register_early_pass ( || box unused_unit :: UnusedUnit ) ;
1033
+ store. register_late_pass ( || box returns :: Return ) ;
1034
1034
store. register_early_pass ( || box collapsible_if:: CollapsibleIf ) ;
1035
1035
store. register_early_pass ( || box items_after_statements:: ItemsAfterStatements ) ;
1036
1036
store. register_early_pass ( || box precedence:: Precedence ) ;
@@ -1288,7 +1288,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1288
1288
LintId :: of( & large_enum_variant:: LARGE_ENUM_VARIANT ) ,
1289
1289
LintId :: of( & len_zero:: LEN_WITHOUT_IS_EMPTY ) ,
1290
1290
LintId :: of( & len_zero:: LEN_ZERO ) ,
1291
- LintId :: of( & let_and_return:: LET_AND_RETURN ) ,
1292
1291
LintId :: of( & let_underscore:: LET_UNDERSCORE_LOCK ) ,
1293
1292
LintId :: of( & lifetimes:: EXTRA_UNUSED_LIFETIMES ) ,
1294
1293
LintId :: of( & lifetimes:: NEEDLESS_LIFETIMES ) ,
@@ -1418,8 +1417,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1418
1417
LintId :: of( & regex:: INVALID_REGEX ) ,
1419
1418
LintId :: of( & regex:: TRIVIAL_REGEX ) ,
1420
1419
LintId :: of( & repeat_once:: REPEAT_ONCE ) ,
1420
+ LintId :: of( & returns:: LET_AND_RETURN ) ,
1421
1421
LintId :: of( & returns:: NEEDLESS_RETURN ) ,
1422
- LintId :: of( & returns:: UNUSED_UNIT ) ,
1423
1422
LintId :: of( & serde_api:: SERDE_API_MISUSE ) ,
1424
1423
LintId :: of( & single_component_path_imports:: SINGLE_COMPONENT_PATH_IMPORTS ) ,
1425
1424
LintId :: of( & slow_vector_initialization:: SLOW_VECTOR_INITIALIZATION ) ,
@@ -1466,6 +1465,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1466
1465
LintId :: of( & unnecessary_sort_by:: UNNECESSARY_SORT_BY ) ,
1467
1466
LintId :: of( & unsafe_removed_from_name:: UNSAFE_REMOVED_FROM_NAME ) ,
1468
1467
LintId :: of( & unused_io_amount:: UNUSED_IO_AMOUNT ) ,
1468
+ LintId :: of( & unused_unit:: UNUSED_UNIT ) ,
1469
1469
LintId :: of( & unwrap:: PANICKING_UNWRAP ) ,
1470
1470
LintId :: of( & unwrap:: UNNECESSARY_UNWRAP ) ,
1471
1471
LintId :: of( & useless_conversion:: USELESS_CONVERSION ) ,
@@ -1506,7 +1506,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1506
1506
LintId :: of( & inherent_to_string:: INHERENT_TO_STRING ) ,
1507
1507
LintId :: of( & len_zero:: LEN_WITHOUT_IS_EMPTY ) ,
1508
1508
LintId :: of( & len_zero:: LEN_ZERO ) ,
1509
- LintId :: of( & let_and_return:: LET_AND_RETURN ) ,
1510
1509
LintId :: of( & literal_representation:: INCONSISTENT_DIGIT_GROUPING ) ,
1511
1510
LintId :: of( & loops:: EMPTY_LOOP ) ,
1512
1511
LintId :: of( & loops:: FOR_KV_MAP ) ,
@@ -1561,8 +1560,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1561
1560
LintId :: of( & redundant_field_names:: REDUNDANT_FIELD_NAMES ) ,
1562
1561
LintId :: of( & redundant_static_lifetimes:: REDUNDANT_STATIC_LIFETIMES ) ,
1563
1562
LintId :: of( & regex:: TRIVIAL_REGEX ) ,
1563
+ LintId :: of( & returns:: LET_AND_RETURN ) ,
1564
1564
LintId :: of( & returns:: NEEDLESS_RETURN ) ,
1565
- LintId :: of( & returns:: UNUSED_UNIT ) ,
1566
1565
LintId :: of( & single_component_path_imports:: SINGLE_COMPONENT_PATH_IMPORTS ) ,
1567
1566
LintId :: of( & strings:: STRING_LIT_AS_BYTES ) ,
1568
1567
LintId :: of( & tabs_in_doc_comments:: TABS_IN_DOC_COMMENTS ) ,
@@ -1571,6 +1570,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1571
1570
LintId :: of( & types:: FN_TO_NUMERIC_CAST ) ,
1572
1571
LintId :: of( & types:: FN_TO_NUMERIC_CAST_WITH_TRUNCATION ) ,
1573
1572
LintId :: of( & unsafe_removed_from_name:: UNSAFE_REMOVED_FROM_NAME ) ,
1573
+ LintId :: of( & unused_unit:: UNUSED_UNIT ) ,
1574
1574
LintId :: of( & write:: PRINTLN_EMPTY_STRING ) ,
1575
1575
LintId :: of( & write:: PRINT_LITERAL ) ,
1576
1576
LintId :: of( & write:: PRINT_WITH_NEWLINE ) ,
0 commit comments