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`
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:18:13
|
|
|
|
|
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.rs:20:13
|
|
|
|
|
LL | let b = *&get_number();
|
|
| ^^^^^^^^^^^^^^ help: try this: `get_number()`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:25:13
|
|
|
|
|
LL | let b = *&bytes[1..2][0];
|
|
| ^^^^^^^^^^^^^^^^ help: try this: `bytes[1..2][0]`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:29:13
|
|
|
|
|
LL | let b = *&(a);
|
|
| ^^^^^ help: try this: `(a)`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:31:13
|
|
|
|
|
LL | let b = *(&a);
|
|
| ^^^^^ help: try this: `a`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:34:13
|
|
|
|
|
LL | let b = *((&a));
|
|
| ^^^^^^^ help: try this: `a`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:36:13
|
|
|
|
|
LL | let b = *&&a;
|
|
| ^^^^ help: try this: `&a`
|
|
|
|
error: immediately dereferencing a reference
|
|
--> $DIR/deref_addrof.rs:38:14
|
|
|
|
|
LL | let b = **&aref;
|
|
| ^^^^^^ help: try this: `aref`
|
|
|
|
error: aborting due to 8 previous errors
|
|
|