@@ -36,12 +36,12 @@ declare_clippy_lint! {
3636 /// }
3737 /// ```
3838 #[ clippy:: version = "1.63.0" ]
39- pub NEEDLESS_PARENS_ON_RANGE_LITERAL ,
39+ pub NEEDLESS_PARENS_ON_RANGE_LITERALS ,
4040 style,
41- "needless parenthesis on range literal can be removed"
41+ "needless parenthesis on range literals can be removed"
4242}
4343
44- declare_lint_pass ! ( NeedlessParensOnRangeLiteral => [ NEEDLESS_PARENS_ON_RANGE_LITERAL ] ) ;
44+ declare_lint_pass ! ( NeedlessParensOnRangeLiterals => [ NEEDLESS_PARENS_ON_RANGE_LITERALS ] ) ;
4545
4646fn snippet_enclosed_in_parenthesis ( snippet : & str ) -> bool {
4747 snippet. starts_with ( '(' ) && snippet. ends_with ( ')' )
@@ -63,8 +63,8 @@ fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) {
6363 if snippet_enclosed_in_parenthesis( & snippet( cx, e. span, "" ) ) ;
6464 then {
6565 let mut applicability = Applicability :: MachineApplicable ;
66- span_lint_and_then( cx, NEEDLESS_PARENS_ON_RANGE_LITERAL , e. span,
67- "needless parenthesis on range literal can be removed" ,
66+ span_lint_and_then( cx, NEEDLESS_PARENS_ON_RANGE_LITERALS , e. span,
67+ "needless parenthesis on range literals can be removed" ,
6868 |diag| {
6969 let suggestion = snippet_with_applicability( cx, literal. span, "_" , & mut applicability) ;
7070 diag. span_suggestion( e. span, "try" , suggestion, applicability) ;
@@ -73,7 +73,7 @@ fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) {
7373 }
7474}
7575
76- impl < ' tcx > LateLintPass < ' tcx > for NeedlessParensOnRangeLiteral {
76+ impl < ' tcx > LateLintPass < ' tcx > for NeedlessParensOnRangeLiterals {
7777 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
7878 if let Some ( higher:: Range { start, end, .. } ) = higher:: Range :: hir ( expr) {
7979 if let Some ( start) = start {
0 commit comments