summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/needless_arbitrary_self_type.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/needless_arbitrary_self_type.stderr')
-rw-r--r--src/tools/clippy/tests/ui/needless_arbitrary_self_type.stderr40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/needless_arbitrary_self_type.stderr b/src/tools/clippy/tests/ui/needless_arbitrary_self_type.stderr
new file mode 100644
index 000000000..f4c645d35
--- /dev/null
+++ b/src/tools/clippy/tests/ui/needless_arbitrary_self_type.stderr
@@ -0,0 +1,40 @@
+error: the type of the `self` parameter does not need to be arbitrary
+ --> $DIR/needless_arbitrary_self_type.rs:12:16
+ |
+LL | pub fn bad(self: Self) {
+ | ^^^^^^^^^^ help: consider to change this parameter to: `self`
+ |
+ = note: `-D clippy::needless-arbitrary-self-type` implied by `-D warnings`
+
+error: the type of the `self` parameter does not need to be arbitrary
+ --> $DIR/needless_arbitrary_self_type.rs:20:20
+ |
+LL | pub fn mut_bad(mut self: Self) {
+ | ^^^^^^^^^^^^^^ help: consider to change this parameter to: `mut self`
+
+error: the type of the `self` parameter does not need to be arbitrary
+ --> $DIR/needless_arbitrary_self_type.rs:28:20
+ |
+LL | pub fn ref_bad(self: &Self) {
+ | ^^^^^^^^^^^ help: consider to change this parameter to: `&self`
+
+error: the type of the `self` parameter does not need to be arbitrary
+ --> $DIR/needless_arbitrary_self_type.rs:36:38
+ |
+LL | pub fn ref_bad_with_lifetime<'a>(self: &'a Self) {
+ | ^^^^^^^^^^^^^^ help: consider to change this parameter to: `&'a self`
+
+error: the type of the `self` parameter does not need to be arbitrary
+ --> $DIR/needless_arbitrary_self_type.rs:44:24
+ |
+LL | pub fn mut_ref_bad(self: &mut Self) {
+ | ^^^^^^^^^^^^^^^ help: consider to change this parameter to: `&mut self`
+
+error: the type of the `self` parameter does not need to be arbitrary
+ --> $DIR/needless_arbitrary_self_type.rs:52:42
+ |
+LL | pub fn mut_ref_bad_with_lifetime<'a>(self: &'a mut Self) {
+ | ^^^^^^^^^^^^^^^^^^ help: consider to change this parameter to: `&'a mut self`
+
+error: aborting due to 6 previous errors
+