about summary refs log tree commit diff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/ui/extend_with_drain.fixed (renamed from tests/ui/append_instead_of_extend.fixed)2
-rw-r--r--tests/ui/extend_with_drain.rs (renamed from tests/ui/append_instead_of_extend.rs)2
-rw-r--r--tests/ui/extend_with_drain.stderr (renamed from tests/ui/append_instead_of_extend.stderr)8
-rw-r--r--tests/ui/needless_bool/fixable.fixed2
-rw-r--r--tests/ui/needless_bool/fixable.rs2
-rw-r--r--tests/ui/self_named_constructors.rs (renamed from tests/ui/self_named_constructor.rs)2
-rw-r--r--tests/ui/self_named_constructors.stderr (renamed from tests/ui/self_named_constructor.stderr)4
-rw-r--r--tests/ui/unit_arg.rs2
-rw-r--r--tests/ui/use_self.fixed2
-rw-r--r--tests/ui/use_self.rs2
10 files changed, 14 insertions, 14 deletions
diff --git a/tests/ui/append_instead_of_extend.fixed b/tests/ui/extend_with_drain.fixed
index 283358333cd..00170e649e2 100644
--- a/tests/ui/append_instead_of_extend.fixed
+++ b/tests/ui/extend_with_drain.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::append_instead_of_extend)]
+#![warn(clippy::extend_with_drain)]
 use std::collections::BinaryHeap;
 fn main() {
     //gets linted
diff --git a/tests/ui/append_instead_of_extend.rs b/tests/ui/extend_with_drain.rs
index abde5cdac5c..d76458c3289 100644
--- a/tests/ui/append_instead_of_extend.rs
+++ b/tests/ui/extend_with_drain.rs
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::append_instead_of_extend)]
+#![warn(clippy::extend_with_drain)]
 use std::collections::BinaryHeap;
 fn main() {
     //gets linted
diff --git a/tests/ui/append_instead_of_extend.stderr b/tests/ui/extend_with_drain.stderr
index 9d309d981de..57f344716a1 100644
--- a/tests/ui/append_instead_of_extend.stderr
+++ b/tests/ui/extend_with_drain.stderr
@@ -1,19 +1,19 @@
 error: use of `extend` instead of `append` for adding the full range of a second vector
-  --> $DIR/append_instead_of_extend.rs:9:5
+  --> $DIR/extend_with_drain.rs:9:5
    |
 LL |     vec2.extend(vec1.drain(..));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `vec2.append(&mut vec1)`
    |
-   = note: `-D clippy::append-instead-of-extend` implied by `-D warnings`
+   = note: `-D clippy::extend-with-drain` implied by `-D warnings`
 
 error: use of `extend` instead of `append` for adding the full range of a second vector
-  --> $DIR/append_instead_of_extend.rs:14:5
+  --> $DIR/extend_with_drain.rs:14:5
    |
 LL |     vec4.extend(vec3.drain(..));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `vec4.append(&mut vec3)`
 
 error: use of `extend` instead of `append` for adding the full range of a second vector
-  --> $DIR/append_instead_of_extend.rs:18:5
+  --> $DIR/extend_with_drain.rs:18:5
    |
 LL |     vec11.extend(return_vector().drain(..));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `vec11.append(&mut return_vector())`
diff --git a/tests/ui/needless_bool/fixable.fixed b/tests/ui/needless_bool/fixable.fixed
index 5917ffc3e12..639eac8b8b3 100644
--- a/tests/ui/needless_bool/fixable.fixed
+++ b/tests/ui/needless_bool/fixable.fixed
@@ -7,7 +7,7 @@
     clippy::no_effect,
     clippy::if_same_then_else,
     clippy::needless_return,
-    clippy::self_named_constructor
+    clippy::self_named_constructors
 )]
 
 use std::cell::Cell;
diff --git a/tests/ui/needless_bool/fixable.rs b/tests/ui/needless_bool/fixable.rs
index d26dcb9fcc3..a3ce086a1c9 100644
--- a/tests/ui/needless_bool/fixable.rs
+++ b/tests/ui/needless_bool/fixable.rs
@@ -7,7 +7,7 @@
     clippy::no_effect,
     clippy::if_same_then_else,
     clippy::needless_return,
-    clippy::self_named_constructor
+    clippy::self_named_constructors
 )]
 
 use std::cell::Cell;
diff --git a/tests/ui/self_named_constructor.rs b/tests/ui/self_named_constructors.rs
index 7658b86a8d6..356f701c985 100644
--- a/tests/ui/self_named_constructor.rs
+++ b/tests/ui/self_named_constructors.rs
@@ -1,4 +1,4 @@
-#![warn(clippy::self_named_constructor)]
+#![warn(clippy::self_named_constructors)]
 
 struct ShouldSpawn;
 struct ShouldNotSpawn;
diff --git a/tests/ui/self_named_constructor.stderr b/tests/ui/self_named_constructors.stderr
index 1e2c34ac2f7..ba989f06dc8 100644
--- a/tests/ui/self_named_constructor.stderr
+++ b/tests/ui/self_named_constructors.stderr
@@ -1,12 +1,12 @@
 error: constructor `should_spawn` has the same name as the type
-  --> $DIR/self_named_constructor.rs:7:5
+  --> $DIR/self_named_constructors.rs:7:5
    |
 LL | /     pub fn should_spawn() -> ShouldSpawn {
 LL | |         ShouldSpawn
 LL | |     }
    | |_____^
    |
-   = note: `-D clippy::self-named-constructor` implied by `-D warnings`
+   = note: `-D clippy::self-named-constructors` implied by `-D warnings`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/unit_arg.rs b/tests/ui/unit_arg.rs
index df0fdaccb34..535683729f6 100644
--- a/tests/ui/unit_arg.rs
+++ b/tests/ui/unit_arg.rs
@@ -7,7 +7,7 @@
     clippy::unnecessary_wraps,
     clippy::or_fun_call,
     clippy::needless_question_mark,
-    clippy::self_named_constructor
+    clippy::self_named_constructors
 )]
 
 use std::fmt::Debug;
diff --git a/tests/ui/use_self.fixed b/tests/ui/use_self.fixed
index 23fc7632511..dcf818f8076 100644
--- a/tests/ui/use_self.fixed
+++ b/tests/ui/use_self.fixed
@@ -8,7 +8,7 @@
     clippy::should_implement_trait,
     clippy::upper_case_acronyms,
     clippy::from_over_into,
-    clippy::self_named_constructor
+    clippy::self_named_constructors
 )]
 
 #[macro_use]
diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs
index bb46a339923..9da6fef7a38 100644
--- a/tests/ui/use_self.rs
+++ b/tests/ui/use_self.rs
@@ -8,7 +8,7 @@
     clippy::should_implement_trait,
     clippy::upper_case_acronyms,
     clippy::from_over_into,
-    clippy::self_named_constructor
+    clippy::self_named_constructors
 )]
 
 #[macro_use]