mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
d1e84c615c
* renames `tests/ui/reference.{rs,stderr}` to `tests/ui/deref_addrof.{rs,stderr} * Moves small part of the testfile to a separate file as the lint triggered again on the fixed code (as intended) * Adds `// run-rustfix` to `tests/ui/deref_addrof.rs`
22 lines
648 B
Text
22 lines
648 B
Text
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof_double_trigger.rs:8:14
|
|
|
|
|
LL | let b = **&&a;
|
|
| ^^^^ help: try this: `&a`
|
|
|
|
|
= note: `-D clippy::deref-addrof` implied by `-D warnings`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof_double_trigger.rs:12:17
|
|
|
|
|
LL | let y = *&mut x;
|
|
| ^^^^^^^ help: try this: `x`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof_double_trigger.rs:19:18
|
|
|
|
|
LL | let y = **&mut &mut x;
|
|
| ^^^^^^^^^^^^ help: try this: `&mut x`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|