rust/tests/ui/misnamed_getters.stderr

187 lines
4.8 KiB
Plaintext
Raw Normal View History

error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> 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
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:17:5
|
LL | / fn a_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:22:5
|
LL | / fn b(self) -> u8 {
LL | |
LL | | self.a
| | ------ help: consider using: `self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:27:5
|
LL | / fn b_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:32:5
|
LL | / fn c(&self) -> &u8 {
LL | |
LL | | &self.b
| | ------- help: consider using: `&self.c`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:37:5
|
LL | / fn c_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.c`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:49:5
|
LL | / unsafe fn a(&self) -> &u8 {
LL | |
LL | | &self.b
| | ------- help: consider using: `&self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:53:5
|
LL | / unsafe fn a_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:58:5
|
LL | / unsafe fn b(self) -> u8 {
LL | |
LL | | self.a
| | ------ help: consider using: `self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:63:5
|
LL | / unsafe fn b_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:76:5
|
LL | / unsafe fn a_unchecked(&self) -> &u8 {
LL | |
LL | | &self.b
| | ------- help: consider using: `&self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:80:5
|
LL | / unsafe fn a_unchecked_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:85:5
|
LL | / unsafe fn b_unchecked(self) -> u8 {
LL | |
LL | | self.a
| | ------ help: consider using: `self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:90:5
|
LL | / unsafe fn b_unchecked_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:123:5
|
LL | / fn a(&self) -> &u8 {
LL | |
LL | | &self.b
| | ------- help: consider using: `&self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:127:5
|
LL | / fn a_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:132:5
|
LL | / fn d(&self) -> &u8 {
LL | |
LL | | &self.b
| | ------- help: consider using: `&self.d`
LL | | }
| |_____^
error: getter function appears to return the wrong field
2024-02-17 06:16:29 -06:00
--> tests/ui/misnamed_getters.rs:136:5
|
LL | / fn d_mut(&mut self) -> &mut u8 {
LL | |
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.d`
LL | | }
| |_____^
error: aborting due to 18 previous errors