about summary refs log tree commit diff
path: root/clippy_lints/src/methods/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-29 10:14:31 +0000
committerbors <bors@rust-lang.org>2021-07-29 10:14:31 +0000
commit0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b (patch)
treef6aea4e92019a291865be21a2e7a810de01de188 /clippy_lints/src/methods/mod.rs
parent766f09f5c12e9103eb78da583eb637d036bdf795 (diff)
parent54e539121d7911933157519a80e8dd30219dc9e0 (diff)
downloadrust-0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b.tar.gz
rust-0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b.zip
Auto merge of #7504 - flip1995:rename-lints, r=flip1995
Rename two lints to comply with our lint naming convention

self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain

We don't need to `register_renamed` those lints, since I'll backport them to beta, so the old names won't hit stable.

changelog: none
(I'll adapt the changelog before merging #7498)
Diffstat (limited to 'clippy_lints/src/methods/mod.rs')
-rw-r--r--clippy_lints/src/methods/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index d3e12023814..5aa29424349 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -1,4 +1,3 @@
-mod append_instead_of_extend;
 mod bind_instead_of_map;
 mod bytes_nth;
 mod chars_cmp;
@@ -12,6 +11,7 @@ mod clone_on_ref_ptr;
 mod cloned_instead_of_copied;
 mod expect_fun_call;
 mod expect_used;
+mod extend_with_drain;
 mod filetype_is_file;
 mod filter_map;
 mod filter_map_identity;
@@ -1068,7 +1068,7 @@ declare_clippy_lint! {
     /// // Good
     /// a.append(&mut b);
     /// ```
-    pub APPEND_INSTEAD_OF_EXTEND,
+    pub EXTEND_WITH_DRAIN,
     perf,
     "using vec.append(&mut vec) to move the full range of a vecor to another"
 }
@@ -1821,7 +1821,7 @@ impl_lint_pass!(Methods => [
     IMPLICIT_CLONE,
     SUSPICIOUS_SPLITN,
     MANUAL_STR_REPEAT,
-    APPEND_INSTEAD_OF_EXTEND
+    EXTEND_WITH_DRAIN
 ]);
 
 /// Extracts a method call name, args, and `Span` of the method name.
@@ -2085,7 +2085,7 @@ fn check_methods<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, msrv: Optio
             },
             ("extend", [arg]) => {
                 string_extend_chars::check(cx, expr, recv, arg);
-                append_instead_of_extend::check(cx, expr, recv, arg);
+                extend_with_drain::check(cx, expr, recv, arg);
             },
             ("filter_map", [arg]) => {
                 unnecessary_filter_map::check(cx, expr, arg);