1 fn get_number() -> usize {
5 fn get_reference(n: &usize) -> &usize {
9 #[allow(clippy::many_single_char_names, clippy::double_parens)]
10 #[allow(unused_variables)]
11 #[warn(clippy::deref_addrof)]
18 let b = *&get_number();
20 let b = *get_reference(&a);
22 let bytes: Vec<usize> = vec![1, 2, 3, 4];
23 let b = *&bytes[1..2][0];
25 //This produces a suggestion of 'let b = (a);' which
26 //will trigger the 'unused_parens' lint
38 //This produces a suggestion of 'let b = *&a;' which
39 //will trigger the 'clippy::deref_addrof' lint again
48 //This produces a suggestion of 'let y = *&mut x' which
49 //will trigger the 'clippy::deref_addrof' lint again
51 let y = **&mut &mut x;