about summary refs log tree commit diff
path: root/src/tools/clippy/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-29 01:40:50 +0000
committerbors <bors@rust-lang.org>2023-07-29 01:40:50 +0000
commit4734ac0943cb19cdf42e9d1aa21380da242e7674 (patch)
tree90e6fa6969d09ef5910b3ccc29b2c7558e69b0f1 /src/tools/clippy/tests
parentca1f813cc305ec504d7e49672c340f0d3a597e5a (diff)
parent2a76c570d6115230af9df0888a721de9fb2c88bc (diff)
downloadrust-4734ac0943cb19cdf42e9d1aa21380da242e7674.tar.gz
rust-4734ac0943cb19cdf42e9d1aa21380da242e7674.zip
Auto merge of #111916 - fee1-dead-contrib:noop-method-call-warn, r=compiler-errors
make `noop_method_call` warn by default

r? `@compiler-errors`
Diffstat (limited to 'src/tools/clippy/tests')
-rw-r--r--src/tools/clippy/tests/ui/explicit_deref_methods.fixed1
-rw-r--r--src/tools/clippy/tests/ui/explicit_deref_methods.rs1
-rw-r--r--src/tools/clippy/tests/ui/explicit_deref_methods.stderr24
3 files changed, 14 insertions, 12 deletions
diff --git a/src/tools/clippy/tests/ui/explicit_deref_methods.fixed b/src/tools/clippy/tests/ui/explicit_deref_methods.fixed
index 4d72b58cdf8..4c0b0d8f275 100644
--- a/src/tools/clippy/tests/ui/explicit_deref_methods.fixed
+++ b/src/tools/clippy/tests/ui/explicit_deref_methods.fixed
@@ -4,6 +4,7 @@
 #![allow(
     clippy::borrow_deref_ref,
     suspicious_double_ref_op,
+    noop_method_call,
     clippy::explicit_auto_deref,
     clippy::needless_borrow,
     clippy::no_effect,
diff --git a/src/tools/clippy/tests/ui/explicit_deref_methods.rs b/src/tools/clippy/tests/ui/explicit_deref_methods.rs
index fcd945de338..bc5da35e52e 100644
--- a/src/tools/clippy/tests/ui/explicit_deref_methods.rs
+++ b/src/tools/clippy/tests/ui/explicit_deref_methods.rs
@@ -4,6 +4,7 @@
 #![allow(
     clippy::borrow_deref_ref,
     suspicious_double_ref_op,
+    noop_method_call,
     clippy::explicit_auto_deref,
     clippy::needless_borrow,
     clippy::no_effect,
diff --git a/src/tools/clippy/tests/ui/explicit_deref_methods.stderr b/src/tools/clippy/tests/ui/explicit_deref_methods.stderr
index 362e559b21a..e4d2fe3a1c3 100644
--- a/src/tools/clippy/tests/ui/explicit_deref_methods.stderr
+++ b/src/tools/clippy/tests/ui/explicit_deref_methods.stderr
@@ -1,5 +1,5 @@
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:54:19
+  --> $DIR/explicit_deref_methods.rs:55:19
    |
 LL |     let b: &str = a.deref();
    |                   ^^^^^^^^^ help: try: `&*a`
@@ -7,67 +7,67 @@ LL |     let b: &str = a.deref();
    = note: `-D clippy::explicit-deref-methods` implied by `-D warnings`
 
 error: explicit `deref_mut` method call
-  --> $DIR/explicit_deref_methods.rs:56:23
+  --> $DIR/explicit_deref_methods.rs:57:23
    |
 LL |     let b: &mut str = a.deref_mut();
    |                       ^^^^^^^^^^^^^ help: try: `&mut **a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:59:39
+  --> $DIR/explicit_deref_methods.rs:60:39
    |
 LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
    |                                       ^^^^^^^^^ help: try: `&*a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:59:50
+  --> $DIR/explicit_deref_methods.rs:60:50
    |
 LL |     let b: String = format!("{}, {}", a.deref(), a.deref());
    |                                                  ^^^^^^^^^ help: try: `&*a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:61:20
+  --> $DIR/explicit_deref_methods.rs:62:20
    |
 LL |     println!("{}", a.deref());
    |                    ^^^^^^^^^ help: try: `&*a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:64:11
+  --> $DIR/explicit_deref_methods.rs:65:11
    |
 LL |     match a.deref() {
    |           ^^^^^^^^^ help: try: `&*a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:68:28
+  --> $DIR/explicit_deref_methods.rs:69:28
    |
 LL |     let b: String = concat(a.deref());
    |                            ^^^^^^^^^ help: try: `&*a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:70:13
+  --> $DIR/explicit_deref_methods.rs:71:13
    |
 LL |     let b = just_return(a).deref();
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `just_return(a)`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:72:28
+  --> $DIR/explicit_deref_methods.rs:73:28
    |
 LL |     let b: String = concat(just_return(a).deref());
    |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `just_return(a)`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:74:19
+  --> $DIR/explicit_deref_methods.rs:75:19
    |
 LL |     let b: &str = a.deref().deref();
    |                   ^^^^^^^^^^^^^^^^^ help: try: `&**a`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:77:13
+  --> $DIR/explicit_deref_methods.rs:78:13
    |
 LL |     let b = opt_a.unwrap().deref();
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*opt_a.unwrap()`
 
 error: explicit `deref` method call
-  --> $DIR/explicit_deref_methods.rs:114:31
+  --> $DIR/explicit_deref_methods.rs:115:31
    |
 LL |     let b: &str = expr_deref!(a.deref());
    |                               ^^^^^^^^^ help: try: `&*a`