diff --git a/tests/ui/deref_addrof_double_trigger.rs b/tests/ui/deref_addrof_double_trigger.rs index e19af5b9087..4531943299c 100644 --- a/tests/ui/deref_addrof_double_trigger.rs +++ b/tests/ui/deref_addrof_double_trigger.rs @@ -1,5 +1,7 @@ +// This test can't work with run-rustfix because it needs two passes of test+fix + #[warn(clippy::deref_addrof)] -#[allow(unused_variables)] +#[allow(unused_variables, unused_mut)] fn main() { let a = 10; diff --git a/tests/ui/deref_addrof_double_trigger.stderr b/tests/ui/deref_addrof_double_trigger.stderr index 89284e1a8ed..2c55a4ed6ac 100644 --- a/tests/ui/deref_addrof_double_trigger.stderr +++ b/tests/ui/deref_addrof_double_trigger.stderr @@ -1,5 +1,5 @@ error: immediately dereferencing a reference - --> $DIR/deref_addrof_double_trigger.rs:8:14 + --> $DIR/deref_addrof_double_trigger.rs:10:14 | LL | let b = **&&a; | ^^^^ help: try this: `&a` @@ -7,13 +7,13 @@ LL | let b = **&&a; = note: `-D clippy::deref-addrof` implied by `-D warnings` error: immediately dereferencing a reference - --> $DIR/deref_addrof_double_trigger.rs:12:17 + --> $DIR/deref_addrof_double_trigger.rs:14:17 | LL | let y = *&mut x; | ^^^^^^^ help: try this: `x` error: immediately dereferencing a reference - --> $DIR/deref_addrof_double_trigger.rs:19:18 + --> $DIR/deref_addrof_double_trigger.rs:21:18 | LL | let y = **&mut &mut x; | ^^^^^^^^^^^^ help: try this: `&mut x`