@@ -36,12 +36,12 @@ declare_clippy_lint! {
36
36
/// }
37
37
/// ```
38
38
#[ clippy:: version = "1.63.0" ]
39
- pub NEEDLESS_PARENS_ON_RANGE_LITERAL ,
39
+ pub NEEDLESS_PARENS_ON_RANGE_LITERALS ,
40
40
style,
41
- "needless parenthesis on range literal can be removed"
41
+ "needless parenthesis on range literals can be removed"
42
42
}
43
43
44
- declare_lint_pass ! ( NeedlessParensOnRangeLiteral => [ NEEDLESS_PARENS_ON_RANGE_LITERAL ] ) ;
44
+ declare_lint_pass ! ( NeedlessParensOnRangeLiterals => [ NEEDLESS_PARENS_ON_RANGE_LITERALS ] ) ;
45
45
46
46
fn snippet_enclosed_in_parenthesis ( snippet : & str ) -> bool {
47
47
snippet. starts_with ( '(' ) && snippet. ends_with ( ')' )
@@ -63,8 +63,8 @@ fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) {
63
63
if snippet_enclosed_in_parenthesis( & snippet( cx, e. span, "" ) ) ;
64
64
then {
65
65
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" ,
68
68
|diag| {
69
69
let suggestion = snippet_with_applicability( cx, literal. span, "_" , & mut applicability) ;
70
70
diag. span_suggestion( e. span, "try" , suggestion, applicability) ;
@@ -73,7 +73,7 @@ fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) {
73
73
}
74
74
}
75
75
76
- impl < ' tcx > LateLintPass < ' tcx > for NeedlessParensOnRangeLiteral {
76
+ impl < ' tcx > LateLintPass < ' tcx > for NeedlessParensOnRangeLiterals {
77
77
fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > ) {
78
78
if let Some ( higher:: Range { start, end, .. } ) = higher:: Range :: hir ( expr) {
79
79
if let Some ( start) = start {
0 commit comments