error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:12:5 | LL | / fn a(&self) -> &u8 { LL | | LL | | LL | | &self.b | | ------- help: consider using: `&self.a` LL | | } | |_____^ | = note: `-D clippy::misnamed-getters` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::misnamed_getters)]` error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:17:5 | LL | / fn a_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | &mut self.b | | ----------- help: consider using: `&mut self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:23:5 | LL | / fn b(self) -> u8 { LL | | LL | | LL | | self.a | | ------ help: consider using: `self.b` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:29:5 | LL | / fn b_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | &mut self.a | | ----------- help: consider using: `&mut self.b` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:35:5 | LL | / fn c(&self) -> &u8 { LL | | LL | | LL | | &self.b | | ------- help: consider using: `&self.c` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:41:5 | LL | / fn c_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | &mut self.a | | ----------- help: consider using: `&mut self.c` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:54:5 | LL | / unsafe fn a(&self) -> &u8 { LL | | LL | | LL | | unsafe { &self.b } | | ------- help: consider using: `&self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:59:5 | LL | / unsafe fn a_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | unsafe { &mut self.b } | | ----------- help: consider using: `&mut self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:65:5 | LL | / unsafe fn b(self) -> u8 { LL | | LL | | LL | | unsafe { self.a } | | ------ help: consider using: `self.b` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:71:5 | LL | / unsafe fn b_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | unsafe { &mut self.a } | | ----------- help: consider using: `&mut self.b` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:85:5 | LL | / unsafe fn a_unchecked(&self) -> &u8 { LL | | LL | | LL | | unsafe { &self.b } | | ------- help: consider using: `&self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:90:5 | LL | / unsafe fn a_unchecked_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | unsafe { &mut self.b } | | ----------- help: consider using: `&mut self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:96:5 | LL | / unsafe fn b_unchecked(self) -> u8 { LL | | LL | | LL | | unsafe { self.a } | | ------ help: consider using: `self.b` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:102:5 | LL | / unsafe fn b_unchecked_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | unsafe { &mut self.a } | | ----------- help: consider using: `&mut self.b` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:136:5 | LL | / fn a(&self) -> &u8 { LL | | LL | | LL | | &self.b | | ------- help: consider using: `&self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:141:5 | LL | / fn a_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | &mut self.b | | ----------- help: consider using: `&mut self.a` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:147:5 | LL | / fn d(&self) -> &u8 { LL | | LL | | LL | | &self.b | | ------- help: consider using: `&self.d` LL | | } | |_____^ error: getter function appears to return the wrong field --> tests/ui/misnamed_getters.rs:152:5 | LL | / fn d_mut(&mut self) -> &mut u8 { LL | | LL | | LL | | &mut self.b | | ----------- help: consider using: `&mut self.d` LL | | } | |_____^ error: aborting due to 18 previous errors