@@ -10,7 +10,7 @@ use rustc_span::{sym, Span};
1010use rustc_trait_selection:: traits:: TraitEngineExt ;
1111
1212declare_lint ! {
13- /// The `for_loop_over_fallibles ` lint checks for `for` loops over `Option` or `Result` values.
13+ /// The `for_loops_over_fallibles ` lint checks for `for` loops over `Option` or `Result` values.
1414 ///
1515 /// ### Example
1616 ///
@@ -34,14 +34,14 @@ declare_lint! {
3434 /// The "intended" use of `IntoIterator` implementations for `Option` and `Result` is passing them to
3535 /// generic code that expects something implementing `IntoIterator`. For example using `.chain(option)`
3636 /// to optionally add a value to an iterator.
37- pub FOR_LOOP_OVER_FALLIBLES ,
37+ pub FOR_LOOPS_OVER_FALLIBLES ,
3838 Warn ,
3939 "for-looping over an `Option` or a `Result`, which is more clearly expressed as an `if let`"
4040}
4141
42- declare_lint_pass ! ( ForLoopOverFallibles => [ FOR_LOOP_OVER_FALLIBLES ] ) ;
42+ declare_lint_pass ! ( ForLoopsOverFallibles => [ FOR_LOOPS_OVER_FALLIBLES ] ) ;
4343
44- impl < ' tcx > LateLintPass < ' tcx > for ForLoopOverFallibles {
44+ impl < ' tcx > LateLintPass < ' tcx > for ForLoopsOverFallibles {
4545 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
4646 let Some ( ( pat, arg) ) = extract_for_loop ( expr) else { return } ;
4747
@@ -59,7 +59,7 @@ impl<'tcx> LateLintPass<'tcx> for ForLoopOverFallibles {
5959 "for loop over {article} `{ty}`. This is more readably written as an `if let` statement" ,
6060 ) ;
6161
62- cx. struct_span_lint ( FOR_LOOP_OVER_FALLIBLES , arg. span , |diag| {
62+ cx. struct_span_lint ( FOR_LOOPS_OVER_FALLIBLES , arg. span , |diag| {
6363 let mut warn = diag. build ( msg) ;
6464
6565 if let Some ( recv) = extract_iterator_next_call ( cx, arg)
0 commit comments