summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/misnamed_getters.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
commit4547b622d8d29df964fa2914213088b148c498fc (patch)
tree9fc6b25f3c3add6b745be9a2400a6e96140046e9 /src/tools/clippy/tests/ui/misnamed_getters.stderr
parentReleasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz
rustc-4547b622d8d29df964fa2914213088b148c498fc.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/misnamed_getters.stderr')
-rw-r--r--src/tools/clippy/tests/ui/misnamed_getters.stderr166
1 files changed, 166 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/misnamed_getters.stderr b/src/tools/clippy/tests/ui/misnamed_getters.stderr
new file mode 100644
index 000000000..1e38a83d0
--- /dev/null
+++ b/src/tools/clippy/tests/ui/misnamed_getters.stderr
@@ -0,0 +1,166 @@
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:11:5
+ |
+LL | / fn a(&self) -> &u8 {
+LL | | &self.b
+ | | ------- help: consider using: `&self.a`
+LL | | }
+ | |_____^
+ |
+ = note: `-D clippy::misnamed-getters` implied by `-D warnings`
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:14:5
+ |
+LL | / fn a_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:18:5
+ |
+LL | / fn b(self) -> u8 {
+LL | | self.a
+ | | ------ help: consider using: `self.b`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:22:5
+ |
+LL | / fn b_mut(&mut self) -> &mut u8 {
+LL | | &mut self.a
+ | | ----------- help: consider using: `&mut self.b`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:26:5
+ |
+LL | / fn c(&self) -> &u8 {
+LL | | &self.b
+ | | ------- help: consider using: `&self.c`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:30:5
+ |
+LL | / fn c_mut(&mut self) -> &mut u8 {
+LL | | &mut self.a
+ | | ----------- help: consider using: `&mut self.c`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:41:5
+ |
+LL | / unsafe fn a(&self) -> &u8 {
+LL | | &self.b
+ | | ------- help: consider using: `&self.a`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:44:5
+ |
+LL | / unsafe fn a_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:48:5
+ |
+LL | / unsafe fn b(self) -> u8 {
+LL | | self.a
+ | | ------ help: consider using: `self.b`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:52:5
+ |
+LL | / unsafe fn b_mut(&mut self) -> &mut u8 {
+LL | | &mut self.a
+ | | ----------- help: consider using: `&mut self.b`
+LL | | }
+ | |_____^
+
+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: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:107:5
+ |
+LL | / fn a(&self) -> &u8 {
+LL | | &self.b
+ | | ------- help: consider using: `&self.a`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:110:5
+ |
+LL | / fn a_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:114:5
+ |
+LL | / fn d(&self) -> &u8 {
+LL | | &self.b
+ | | ------- help: consider using: `&self.d`
+LL | | }
+ | |_____^
+
+error: getter function appears to return the wrong field
+ --> $DIR/misnamed_getters.rs:117:5
+ |
+LL | / fn d_mut(&mut self) -> &mut u8 {
+LL | | &mut self.b
+ | | ----------- help: consider using: `&mut self.d`
+LL | | }
+ | |_____^
+
+error: aborting due to 18 previous errors
+