1 // This test can't work with run-rustfix because it needs two passes of test+fix
2 
3 #[warn(clippy::deref_addrof)]
4 #[allow(unused_variables, unused_mut)]
main()5 fn main() {
6     let a = 10;
7 
8     //This produces a suggestion of 'let b = *&a;' which
9     //will trigger the 'clippy::deref_addrof' lint again
10     let b = **&&a;
11 
12     {
13         let mut x = 10;
14         let y = *&mut x;
15     }
16 
17     {
18         //This produces a suggestion of 'let y = *&mut x' which
19         //will trigger the 'clippy::deref_addrof' lint again
20         let mut x = 10;
21         let y = **&mut &mut x;
22     }
23 }
24