@@ -226,7 +226,6 @@ mod future_not_send;
226
226
mod get_last_with_len;
227
227
mod identity_op;
228
228
mod if_let_mutex;
229
- mod if_let_some_result;
230
229
mod if_not_else;
231
230
mod if_then_some_else_none;
232
231
mod implicit_hasher;
@@ -291,6 +290,7 @@ mod needless_borrow;
291
290
mod needless_borrowed_ref;
292
291
mod needless_continue;
293
292
mod needless_for_each;
293
+ mod needless_ok;
294
294
mod needless_pass_by_value;
295
295
mod needless_question_mark;
296
296
mod needless_update;
@@ -376,7 +376,6 @@ mod vec;
376
376
mod vec_init_then_push;
377
377
mod vec_resize_to_zero;
378
378
mod verbose_file_reads;
379
- mod while_let_some_result;
380
379
mod wildcard_dependencies;
381
380
mod wildcard_imports;
382
381
mod write;
@@ -656,7 +655,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
656
655
get_last_with_len:: GET_LAST_WITH_LEN ,
657
656
identity_op:: IDENTITY_OP ,
658
657
if_let_mutex:: IF_LET_MUTEX ,
659
- if_let_some_result:: IF_LET_SOME_RESULT ,
660
658
if_not_else:: IF_NOT_ELSE ,
661
659
if_then_some_else_none:: IF_THEN_SOME_ELSE_NONE ,
662
660
implicit_hasher:: IMPLICIT_HASHER ,
@@ -851,6 +849,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
851
849
needless_borrowed_ref:: NEEDLESS_BORROWED_REFERENCE ,
852
850
needless_continue:: NEEDLESS_CONTINUE ,
853
851
needless_for_each:: NEEDLESS_FOR_EACH ,
852
+ needless_ok:: IF_LET_SOME_RESULT ,
853
+ needless_ok:: WHILE_LET_SOME_RESULT ,
854
854
needless_pass_by_value:: NEEDLESS_PASS_BY_VALUE ,
855
855
needless_question_mark:: NEEDLESS_QUESTION_MARK ,
856
856
needless_update:: NEEDLESS_UPDATE ,
@@ -989,7 +989,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
989
989
vec_init_then_push:: VEC_INIT_THEN_PUSH ,
990
990
vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
991
991
verbose_file_reads:: VERBOSE_FILE_READS ,
992
- while_let_some_result:: WHILE_LET_SOME_RESULT ,
993
992
wildcard_dependencies:: WILDCARD_DEPENDENCIES ,
994
993
wildcard_imports:: ENUM_GLOB_USE ,
995
994
wildcard_imports:: WILDCARD_IMPORTS ,
@@ -1250,7 +1249,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1250
1249
LintId :: of( get_last_with_len:: GET_LAST_WITH_LEN ) ,
1251
1250
LintId :: of( identity_op:: IDENTITY_OP ) ,
1252
1251
LintId :: of( if_let_mutex:: IF_LET_MUTEX ) ,
1253
- LintId :: of( if_let_some_result:: IF_LET_SOME_RESULT ) ,
1254
1252
LintId :: of( indexing_slicing:: OUT_OF_BOUNDS_INDEXING ) ,
1255
1253
LintId :: of( infinite_iter:: INFINITE_ITER ) ,
1256
1254
LintId :: of( inherent_to_string:: INHERENT_TO_STRING ) ,
@@ -1380,6 +1378,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1380
1378
LintId :: of( needless_bool:: NEEDLESS_BOOL ) ,
1381
1379
LintId :: of( needless_borrow:: NEEDLESS_BORROW ) ,
1382
1380
LintId :: of( needless_borrowed_ref:: NEEDLESS_BORROWED_REFERENCE ) ,
1381
+ LintId :: of( needless_ok:: IF_LET_SOME_RESULT ) ,
1382
+ LintId :: of( needless_ok:: WHILE_LET_SOME_RESULT ) ,
1383
1383
LintId :: of( needless_question_mark:: NEEDLESS_QUESTION_MARK ) ,
1384
1384
LintId :: of( needless_update:: NEEDLESS_UPDATE ) ,
1385
1385
LintId :: of( neg_cmp_op_on_partial_ord:: NEG_CMP_OP_ON_PARTIAL_ORD ) ,
@@ -1470,7 +1470,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1470
1470
LintId :: of( vec:: USELESS_VEC ) ,
1471
1471
LintId :: of( vec_init_then_push:: VEC_INIT_THEN_PUSH ) ,
1472
1472
LintId :: of( vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ) ,
1473
- LintId :: of( while_let_some_result:: WHILE_LET_SOME_RESULT ) ,
1474
1473
LintId :: of( write:: PRINTLN_EMPTY_STRING ) ,
1475
1474
LintId :: of( write:: PRINT_LITERAL ) ,
1476
1475
LintId :: of( write:: PRINT_WITH_NEWLINE ) ,
@@ -1505,7 +1504,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1505
1504
LintId :: of( functions:: DOUBLE_MUST_USE ) ,
1506
1505
LintId :: of( functions:: MUST_USE_UNIT ) ,
1507
1506
LintId :: of( functions:: RESULT_UNIT_ERR ) ,
1508
- LintId :: of( if_let_some_result:: IF_LET_SOME_RESULT ) ,
1509
1507
LintId :: of( inherent_to_string:: INHERENT_TO_STRING ) ,
1510
1508
LintId :: of( len_zero:: COMPARISON_TO_EMPTY ) ,
1511
1509
LintId :: of( len_zero:: LEN_WITHOUT_IS_EMPTY ) ,
@@ -1560,6 +1558,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1560
1558
LintId :: of( mut_mutex_lock:: MUT_MUTEX_LOCK ) ,
1561
1559
LintId :: of( mut_reference:: UNNECESSARY_MUT_PASSED ) ,
1562
1560
LintId :: of( needless_borrow:: NEEDLESS_BORROW ) ,
1561
+ LintId :: of( needless_ok:: IF_LET_SOME_RESULT ) ,
1562
+ LintId :: of( needless_ok:: WHILE_LET_SOME_RESULT ) ,
1563
1563
LintId :: of( neg_multiply:: NEG_MULTIPLY ) ,
1564
1564
LintId :: of( new_without_default:: NEW_WITHOUT_DEFAULT ) ,
1565
1565
LintId :: of( non_copy_const:: BORROW_INTERIOR_MUTABLE_CONST ) ,
@@ -1583,7 +1583,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1583
1583
LintId :: of( unsafe_removed_from_name:: UNSAFE_REMOVED_FROM_NAME ) ,
1584
1584
LintId :: of( unused_unit:: UNUSED_UNIT ) ,
1585
1585
LintId :: of( upper_case_acronyms:: UPPER_CASE_ACRONYMS ) ,
1586
- LintId :: of( while_let_some_result:: WHILE_LET_SOME_RESULT ) ,
1587
1586
LintId :: of( write:: PRINTLN_EMPTY_STRING ) ,
1588
1587
LintId :: of( write:: PRINT_LITERAL ) ,
1589
1588
LintId :: of( write:: PRINT_WITH_NEWLINE ) ,
@@ -1975,8 +1974,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
1975
1974
store. register_late_pass ( || box missing_doc:: MissingDoc :: new ( ) ) ;
1976
1975
store. register_late_pass ( || box missing_inline:: MissingInline ) ;
1977
1976
store. register_late_pass ( move || box exhaustive_items:: ExhaustiveItems ) ;
1978
- store. register_late_pass ( || box if_let_some_result:: OkIfLet ) ;
1979
- store. register_late_pass ( || box while_let_some_result:: WhileLetSomeResult ) ;
1977
+ store. register_late_pass ( || box needless_ok:: NeedlessOk ) ;
1980
1978
store. register_late_pass ( || box partialeq_ne_impl:: PartialEqNeImpl ) ;
1981
1979
store. register_late_pass ( || box unused_io_amount:: UnusedIoAmount ) ;
1982
1980
let enum_variant_size_threshold = conf. enum_variant_size_threshold ;
0 commit comments