2 #![allow(clippy::return_self_not_must_use)]
3 #![warn(clippy::deref_addrof)]
5 fn get_number() -> usize {
9 fn get_reference(n: &usize) -> &usize {
13 #[allow(clippy::double_parens)]
14 #[allow(unused_variables, unused_parens)]
21 let b = *&get_number();
23 let b = *get_reference(&a);
25 let bytes: Vec<usize> = vec![1, 2, 3, 4];
26 let b = *&bytes[1..2][0];
28 //This produces a suggestion of 'let b = (a);' which
29 //will trigger the 'unused_parens' lint
41 let _ = unsafe { *core::ptr::addr_of!(a) };
58 #[derive(Copy, Clone)]
61 pub fn f(&self) -> &Self {
64 #[allow(unused_mut)] // mut will be unused, once the macro is fixed
65 pub fn f_mut(mut self) -> Self {