@@ -226,7 +226,6 @@ mod future_not_send;
226226mod get_last_with_len;
227227mod identity_op;
228228mod if_let_mutex;
229- mod if_let_some_result;
230229mod if_not_else;
231230mod if_then_some_else_none;
232231mod implicit_hasher;
@@ -291,6 +290,7 @@ mod needless_borrow;
291290mod needless_borrowed_ref;
292291mod needless_continue;
293292mod needless_for_each;
293+ mod needless_ok;
294294mod needless_pass_by_value;
295295mod needless_question_mark;
296296mod needless_update;
@@ -376,7 +376,6 @@ mod vec;
376376mod vec_init_then_push;
377377mod vec_resize_to_zero;
378378mod verbose_file_reads;
379- mod while_let_some_result;
380379mod wildcard_dependencies;
381380mod wildcard_imports;
382381mod write;
@@ -656,7 +655,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
656655 get_last_with_len:: GET_LAST_WITH_LEN ,
657656 identity_op:: IDENTITY_OP ,
658657 if_let_mutex:: IF_LET_MUTEX ,
659- if_let_some_result:: IF_LET_SOME_RESULT ,
660658 if_not_else:: IF_NOT_ELSE ,
661659 if_then_some_else_none:: IF_THEN_SOME_ELSE_NONE ,
662660 implicit_hasher:: IMPLICIT_HASHER ,
@@ -851,6 +849,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
851849 needless_borrowed_ref:: NEEDLESS_BORROWED_REFERENCE ,
852850 needless_continue:: NEEDLESS_CONTINUE ,
853851 needless_for_each:: NEEDLESS_FOR_EACH ,
852+ needless_ok:: IF_LET_SOME_RESULT ,
853+ needless_ok:: WHILE_LET_SOME_RESULT ,
854854 needless_pass_by_value:: NEEDLESS_PASS_BY_VALUE ,
855855 needless_question_mark:: NEEDLESS_QUESTION_MARK ,
856856 needless_update:: NEEDLESS_UPDATE ,
@@ -989,7 +989,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
989989 vec_init_then_push:: VEC_INIT_THEN_PUSH ,
990990 vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ,
991991 verbose_file_reads:: VERBOSE_FILE_READS ,
992- while_let_some_result:: WHILE_LET_SOME_RESULT ,
993992 wildcard_dependencies:: WILDCARD_DEPENDENCIES ,
994993 wildcard_imports:: ENUM_GLOB_USE ,
995994 wildcard_imports:: WILDCARD_IMPORTS ,
@@ -1250,7 +1249,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12501249 LintId :: of( get_last_with_len:: GET_LAST_WITH_LEN ) ,
12511250 LintId :: of( identity_op:: IDENTITY_OP ) ,
12521251 LintId :: of( if_let_mutex:: IF_LET_MUTEX ) ,
1253- LintId :: of( if_let_some_result:: IF_LET_SOME_RESULT ) ,
12541252 LintId :: of( indexing_slicing:: OUT_OF_BOUNDS_INDEXING ) ,
12551253 LintId :: of( infinite_iter:: INFINITE_ITER ) ,
12561254 LintId :: of( inherent_to_string:: INHERENT_TO_STRING ) ,
@@ -1380,6 +1378,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13801378 LintId :: of( needless_bool:: NEEDLESS_BOOL ) ,
13811379 LintId :: of( needless_borrow:: NEEDLESS_BORROW ) ,
13821380 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 ) ,
13831383 LintId :: of( needless_question_mark:: NEEDLESS_QUESTION_MARK ) ,
13841384 LintId :: of( needless_update:: NEEDLESS_UPDATE ) ,
13851385 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:
14701470 LintId :: of( vec:: USELESS_VEC ) ,
14711471 LintId :: of( vec_init_then_push:: VEC_INIT_THEN_PUSH ) ,
14721472 LintId :: of( vec_resize_to_zero:: VEC_RESIZE_TO_ZERO ) ,
1473- LintId :: of( while_let_some_result:: WHILE_LET_SOME_RESULT ) ,
14741473 LintId :: of( write:: PRINTLN_EMPTY_STRING ) ,
14751474 LintId :: of( write:: PRINT_LITERAL ) ,
14761475 LintId :: of( write:: PRINT_WITH_NEWLINE ) ,
@@ -1505,7 +1504,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15051504 LintId :: of( functions:: DOUBLE_MUST_USE ) ,
15061505 LintId :: of( functions:: MUST_USE_UNIT ) ,
15071506 LintId :: of( functions:: RESULT_UNIT_ERR ) ,
1508- LintId :: of( if_let_some_result:: IF_LET_SOME_RESULT ) ,
15091507 LintId :: of( inherent_to_string:: INHERENT_TO_STRING ) ,
15101508 LintId :: of( len_zero:: COMPARISON_TO_EMPTY ) ,
15111509 LintId :: of( len_zero:: LEN_WITHOUT_IS_EMPTY ) ,
@@ -1560,6 +1558,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15601558 LintId :: of( mut_mutex_lock:: MUT_MUTEX_LOCK ) ,
15611559 LintId :: of( mut_reference:: UNNECESSARY_MUT_PASSED ) ,
15621560 LintId :: of( needless_borrow:: NEEDLESS_BORROW ) ,
1561+ LintId :: of( needless_ok:: IF_LET_SOME_RESULT ) ,
1562+ LintId :: of( needless_ok:: WHILE_LET_SOME_RESULT ) ,
15631563 LintId :: of( neg_multiply:: NEG_MULTIPLY ) ,
15641564 LintId :: of( new_without_default:: NEW_WITHOUT_DEFAULT ) ,
15651565 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:
15831583 LintId :: of( unsafe_removed_from_name:: UNSAFE_REMOVED_FROM_NAME ) ,
15841584 LintId :: of( unused_unit:: UNUSED_UNIT ) ,
15851585 LintId :: of( upper_case_acronyms:: UPPER_CASE_ACRONYMS ) ,
1586- LintId :: of( while_let_some_result:: WHILE_LET_SOME_RESULT ) ,
15871586 LintId :: of( write:: PRINTLN_EMPTY_STRING ) ,
15881587 LintId :: of( write:: PRINT_LITERAL ) ,
15891588 LintId :: of( write:: PRINT_WITH_NEWLINE ) ,
@@ -1975,8 +1974,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
19751974 store. register_late_pass ( || box missing_doc:: MissingDoc :: new ( ) ) ;
19761975 store. register_late_pass ( || box missing_inline:: MissingInline ) ;
19771976 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 ) ;
19801978 store. register_late_pass ( || box partialeq_ne_impl:: PartialEqNeImpl ) ;
19811979 store. register_late_pass ( || box unused_io_amount:: UnusedIoAmount ) ;
19821980 let enum_variant_size_threshold = conf. enum_variant_size_threshold ;
0 commit comments