fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: getter function appears to return the wrong field 2 --> $DIR/misnamed_getters.rs:11:5 3 | 4LL | / fn a(&self) -> &u8 { 5LL | | 6LL | | 7LL | | &self.b 8 | | ------- help: consider using: `&self.a` 9LL | | } 10 | |_____^ 11 | 12 = note: `-D clippy::misnamed-getters` implied by `-D warnings` 13 = help: to override `-D warnings` add `#[allow(clippy::misnamed_getters)]` 14 15error: getter function appears to return the wrong field 16 --> $DIR/misnamed_getters.rs:16:5 17 | 18LL | / fn a_mut(&mut self) -> &mut u8 { 19LL | | 20LL | | &mut self.b 21 | | ----------- help: consider using: `&mut self.a` 22LL | | } 23 | |_____^ 24 25error: getter function appears to return the wrong field 26 --> $DIR/misnamed_getters.rs:21:5 27 | 28LL | / fn b(self) -> u8 { 29LL | | 30LL | | self.a 31 | | ------ help: consider using: `self.b` 32LL | | } 33 | |_____^ 34 35error: getter function appears to return the wrong field 36 --> $DIR/misnamed_getters.rs:26:5 37 | 38LL | / fn b_mut(&mut self) -> &mut u8 { 39LL | | 40LL | | &mut self.a 41 | | ----------- help: consider using: `&mut self.b` 42LL | | } 43 | |_____^ 44 45error: getter function appears to return the wrong field 46 --> $DIR/misnamed_getters.rs:31:5 47 | 48LL | / fn c(&self) -> &u8 { 49LL | | 50LL | | &self.b 51 | | ------- help: consider using: `&self.c` 52LL | | } 53 | |_____^ 54 55error: getter function appears to return the wrong field 56 --> $DIR/misnamed_getters.rs:36:5 57 | 58LL | / fn c_mut(&mut self) -> &mut u8 { 59LL | | 60LL | | &mut self.a 61 | | ----------- help: consider using: `&mut self.c` 62LL | | } 63 | |_____^ 64 65error: getter function appears to return the wrong field 66 --> $DIR/misnamed_getters.rs:48:5 67 | 68LL | / unsafe fn a(&self) -> &u8 { 69LL | | 70LL | | &self.b 71 | | ------- help: consider using: `&self.a` 72LL | | } 73 | |_____^ 74 75error: getter function appears to return the wrong field 76 --> $DIR/misnamed_getters.rs:52:5 77 | 78LL | / unsafe fn a_mut(&mut self) -> &mut u8 { 79LL | | 80LL | | &mut self.b 81 | | ----------- help: consider using: `&mut self.a` 82LL | | } 83 | |_____^ 84 85error: getter function appears to return the wrong field 86 --> $DIR/misnamed_getters.rs:57:5 87 | 88LL | / unsafe fn b(self) -> u8 { 89LL | | 90LL | | self.a 91 | | ------ help: consider using: `self.b` 92LL | | } 93 | |_____^ 94 95error: getter function appears to return the wrong field 96 --> $DIR/misnamed_getters.rs:62:5 97 | 98LL | / unsafe fn b_mut(&mut self) -> &mut u8 { 99LL | | 100LL | | &mut self.a 101 | | ----------- help: consider using: `&mut self.b` 102LL | | } 103 | |_____^ 104 105error: getter function appears to return the wrong field 106 --> $DIR/misnamed_getters.rs:75:5 107 | 108LL | / unsafe fn a_unchecked(&self) -> &u8 { 109LL | | 110LL | | &self.b 111 | | ------- help: consider using: `&self.a` 112LL | | } 113 | |_____^ 114 115error: getter function appears to return the wrong field 116 --> $DIR/misnamed_getters.rs:79:5 117 | 118LL | / unsafe fn a_unchecked_mut(&mut self) -> &mut u8 { 119LL | | 120LL | | &mut self.b 121 | | ----------- help: consider using: `&mut self.a` 122LL | | } 123 | |_____^ 124 125error: getter function appears to return the wrong field 126 --> $DIR/misnamed_getters.rs:84:5 127 | 128LL | / unsafe fn b_unchecked(self) -> u8 { 129LL | | 130LL | | self.a 131 | | ------ help: consider using: `self.b` 132LL | | } 133 | |_____^ 134 135error: getter function appears to return the wrong field 136 --> $DIR/misnamed_getters.rs:89:5 137 | 138LL | / unsafe fn b_unchecked_mut(&mut self) -> &mut u8 { 139LL | | 140LL | | &mut self.a 141 | | ----------- help: consider using: `&mut self.b` 142LL | | } 143 | |_____^ 144 145error: getter function appears to return the wrong field 146 --> $DIR/misnamed_getters.rs:122:5 147 | 148LL | / fn a(&self) -> &u8 { 149LL | | 150LL | | &self.b 151 | | ------- help: consider using: `&self.a` 152LL | | } 153 | |_____^ 154 155error: getter function appears to return the wrong field 156 --> $DIR/misnamed_getters.rs:126:5 157 | 158LL | / fn a_mut(&mut self) -> &mut u8 { 159LL | | 160LL | | &mut self.b 161 | | ----------- help: consider using: `&mut self.a` 162LL | | } 163 | |_____^ 164 165error: getter function appears to return the wrong field 166 --> $DIR/misnamed_getters.rs:131:5 167 | 168LL | / fn d(&self) -> &u8 { 169LL | | 170LL | | &self.b 171 | | ------- help: consider using: `&self.d` 172LL | | } 173 | |_____^ 174 175error: getter function appears to return the wrong field 176 --> $DIR/misnamed_getters.rs:135:5 177 | 178LL | / fn d_mut(&mut self) -> &mut u8 { 179LL | | 180LL | | &mut self.b 181 | | ----------- help: consider using: `&mut self.d` 182LL | | } 183 | |_____^ 184 185error: aborting due to 18 previous errors 186