@@ -27,13 +27,13 @@ declare_clippy_lint! {
27
27
/// vec!["1", "2", "3"].join("");
28
28
/// ```
29
29
#[ clippy:: version = "1.62.0" ]
30
- pub UNNECESSARY_OWNED_EMPTY_STRING ,
30
+ pub UNNECESSARY_OWNED_EMPTY_STRINGS ,
31
31
style,
32
32
"detects cases of references to owned empty strings being passed as an argument to a function expecting `&str`"
33
33
}
34
- declare_lint_pass ! ( UnnecessaryOwnedEmptyString => [ UNNECESSARY_OWNED_EMPTY_STRING ] ) ;
34
+ declare_lint_pass ! ( UnnecessaryOwnedEmptyStrings => [ UNNECESSARY_OWNED_EMPTY_STRINGS ] ) ;
35
35
36
- impl < ' tcx > LateLintPass < ' tcx > for UnnecessaryOwnedEmptyString {
36
+ impl < ' tcx > LateLintPass < ' tcx > for UnnecessaryOwnedEmptyStrings {
37
37
fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' tcx > ) {
38
38
if_chain ! {
39
39
if let ExprKind :: AddrOf ( BorrowKind :: Ref , Mutability :: Not , inner_expr) = expr. kind;
@@ -46,7 +46,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyString {
46
46
if match_def_path( cx, fun_def_id, & paths:: STRING_NEW ) {
47
47
span_lint_and_sugg(
48
48
cx,
49
- UNNECESSARY_OWNED_EMPTY_STRING ,
49
+ UNNECESSARY_OWNED_EMPTY_STRINGS ,
50
50
expr. span,
51
51
"usage of `&String::new()` for a function expecting a `&str` argument" ,
52
52
"try" ,
@@ -65,7 +65,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyString {
65
65
then {
66
66
span_lint_and_sugg(
67
67
cx,
68
- UNNECESSARY_OWNED_EMPTY_STRING ,
68
+ UNNECESSARY_OWNED_EMPTY_STRINGS ,
69
69
expr. span,
70
70
"usage of `&String::from(\" \" )` for a function expecting a `&str` argument" ,
71
71
"try" ,
0 commit comments