rust-clippy/tests/ui/misnamed_getters.stderr

131 lines
3.6 KiB
Text
Raw Normal View History

2022-11-01 17:39:36 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:11:5
2022-11-01 17:39:36 +00:00
|
LL | / fn a(&self) -> &u8 {
LL | | &self.b
| | ------- help: consider using: `&self.a`
LL | | }
| |_____^
2022-11-01 17:39:36 +00:00
|
2022-11-02 08:01:33 +00:00
= note: `-D clippy::misnamed-getters` implied by `-D warnings`
2022-11-01 17:39:36 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:14:5
2022-11-01 18:07:51 +00:00
|
LL | / fn a_mut(&mut self) -> &mut u8 {
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:18:5
2022-11-01 18:07:51 +00:00
|
LL | / fn b(self) -> u8 {
LL | | self.a
| | ------ help: consider using: `self.b`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:22:5
2022-11-01 18:07:51 +00:00
|
LL | / fn b_mut(&mut self) -> &mut u8 {
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.b`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:26:5
2022-11-01 18:07:51 +00:00
|
LL | / fn c(&self) -> &u8 {
LL | | &self.b
| | ------- help: consider using: `&self.c`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:30:5
2022-11-01 18:07:51 +00:00
|
LL | / fn c_mut(&mut self) -> &mut u8 {
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.c`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:41:5
2022-11-01 17:39:36 +00:00
|
LL | / unsafe fn a(&self) -> &u8 {
LL | | &self.b
| | ------- help: consider using: `&self.a`
LL | | }
| |_____^
2022-11-01 17:39:36 +00:00
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:44:5
2022-11-01 18:07:51 +00:00
|
LL | / unsafe fn a_mut(&mut self) -> &mut u8 {
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:48:5
2022-11-01 18:07:51 +00:00
|
LL | / unsafe fn b(self) -> u8 {
LL | | self.a
| | ------ help: consider using: `self.b`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
2022-11-02 08:01:33 +00:00
--> $DIR/misnamed_getters.rs:52:5
2022-11-01 18:07:51 +00:00
|
LL | / unsafe fn b_mut(&mut self) -> &mut u8 {
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.b`
LL | | }
| |_____^
2022-11-01 18:07:51 +00:00
error: getter function appears to return the wrong field
--> $DIR/misnamed_getters.rs:64:5
|
LL | / unsafe fn a_unchecked(&self) -> &u8 {
LL | | &self.b
| | ------- help: consider using: `&self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
--> $DIR/misnamed_getters.rs:67:5
|
LL | / unsafe fn a_unchecked_mut(&mut self) -> &mut u8 {
LL | | &mut self.b
| | ----------- help: consider using: `&mut self.a`
LL | | }
| |_____^
error: getter function appears to return the wrong field
--> $DIR/misnamed_getters.rs:71:5
|
LL | / unsafe fn b_unchecked(self) -> u8 {
LL | | self.a
| | ------ help: consider using: `self.b`
LL | | }
| |_____^
error: getter function appears to return the wrong field
--> $DIR/misnamed_getters.rs:75:5
|
LL | / unsafe fn b_unchecked_mut(&mut self) -> &mut u8 {
LL | | &mut self.a
| | ----------- help: consider using: `&mut self.b`
LL | | }
| |_____^
error: aborting due to 14 previous errors
2022-11-01 17:39:36 +00:00