fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: `x` is shadowed by itself in `x` 2 --> $DIR/shadow.rs:24:9 3 | 4LL | let x = x; 5 | ^ 6 | 7note: previous binding is here 8 --> $DIR/shadow.rs:23:9 9 | 10LL | let x = 1; 11 | ^ 12 = note: `-D clippy::shadow-same` implied by `-D warnings` 13 = help: to override `-D warnings` add `#[allow(clippy::shadow_same)]` 14 15error: `mut x` is shadowed by itself in `&x` 16 --> $DIR/shadow.rs:25:13 17 | 18LL | let mut x = &x; 19 | ^ 20 | 21note: previous binding is here 22 --> $DIR/shadow.rs:24:9 23 | 24LL | let x = x; 25 | ^ 26 27error: `x` is shadowed by itself in `&mut x` 28 --> $DIR/shadow.rs:26:9 29 | 30LL | let x = &mut x; 31 | ^ 32 | 33note: previous binding is here 34 --> $DIR/shadow.rs:25:9 35 | 36LL | let mut x = &x; 37 | ^^^^^ 38 39error: `x` is shadowed by itself in `*x` 40 --> $DIR/shadow.rs:27:9 41 | 42LL | let x = *x; 43 | ^ 44 | 45note: previous binding is here 46 --> $DIR/shadow.rs:26:9 47 | 48LL | let x = &mut x; 49 | ^ 50 51error: `x` is shadowed 52 --> $DIR/shadow.rs:32:9 53 | 54LL | let x = x.0; 55 | ^ 56 | 57note: previous binding is here 58 --> $DIR/shadow.rs:31:9 59 | 60LL | let x = ([[0]], ()); 61 | ^ 62 = note: `-D clippy::shadow-reuse` implied by `-D warnings` 63 = help: to override `-D warnings` add `#[allow(clippy::shadow_reuse)]` 64 65error: `x` is shadowed 66 --> $DIR/shadow.rs:33:9 67 | 68LL | let x = x[0]; 69 | ^ 70 | 71note: previous binding is here 72 --> $DIR/shadow.rs:32:9 73 | 74LL | let x = x.0; 75 | ^ 76 77error: `x` is shadowed 78 --> $DIR/shadow.rs:34:10 79 | 80LL | let [x] = x; 81 | ^ 82 | 83note: previous binding is here 84 --> $DIR/shadow.rs:33:9 85 | 86LL | let x = x[0]; 87 | ^ 88 89error: `x` is shadowed 90 --> $DIR/shadow.rs:35:9 91 | 92LL | let x = Some(x); 93 | ^ 94 | 95note: previous binding is here 96 --> $DIR/shadow.rs:34:10 97 | 98LL | let [x] = x; 99 | ^ 100 101error: `x` is shadowed 102 --> $DIR/shadow.rs:36:9 103 | 104LL | let x = foo(x); 105 | ^ 106 | 107note: previous binding is here 108 --> $DIR/shadow.rs:35:9 109 | 110LL | let x = Some(x); 111 | ^ 112 113error: `x` is shadowed 114 --> $DIR/shadow.rs:37:9 115 | 116LL | let x = || x; 117 | ^ 118 | 119note: previous binding is here 120 --> $DIR/shadow.rs:36:9 121 | 122LL | let x = foo(x); 123 | ^ 124 125error: `x` is shadowed 126 --> $DIR/shadow.rs:38:9 127 | 128LL | let x = Some(1).map(|_| x)?; 129 | ^ 130 | 131note: previous binding is here 132 --> $DIR/shadow.rs:37:9 133 | 134LL | let x = || x; 135 | ^ 136 137error: `y` is shadowed 138 --> $DIR/shadow.rs:40:9 139 | 140LL | let y = match y { 141 | ^ 142 | 143note: previous binding is here 144 --> $DIR/shadow.rs:39:9 145 | 146LL | let y = 1; 147 | ^ 148 149error: `x` shadows a previous, unrelated binding 150 --> $DIR/shadow.rs:55:9 151 | 152LL | let x = 2; 153 | ^ 154 | 155note: previous binding is here 156 --> $DIR/shadow.rs:54:9 157 | 158LL | let x = 1; 159 | ^ 160 = note: `-D clippy::shadow-unrelated` implied by `-D warnings` 161 = help: to override `-D warnings` add `#[allow(clippy::shadow_unrelated)]` 162 163error: `x` shadows a previous, unrelated binding 164 --> $DIR/shadow.rs:60:13 165 | 166LL | let x = 1; 167 | ^ 168 | 169note: previous binding is here 170 --> $DIR/shadow.rs:59:10 171 | 172LL | fn f(x: u32) { 173 | ^ 174 175error: `x` shadows a previous, unrelated binding 176 --> $DIR/shadow.rs:65:14 177 | 178LL | Some(x) => { 179 | ^ 180 | 181note: previous binding is here 182 --> $DIR/shadow.rs:62:9 183 | 184LL | let x = 1; 185 | ^ 186 187error: `x` shadows a previous, unrelated binding 188 --> $DIR/shadow.rs:66:17 189 | 190LL | let x = 1; 191 | ^ 192 | 193note: previous binding is here 194 --> $DIR/shadow.rs:65:14 195 | 196LL | Some(x) => { 197 | ^ 198 199error: `x` shadows a previous, unrelated binding 200 --> $DIR/shadow.rs:70:17 201 | 202LL | if let Some(x) = Some(1) {} 203 | ^ 204 | 205note: previous binding is here 206 --> $DIR/shadow.rs:62:9 207 | 208LL | let x = 1; 209 | ^ 210 211error: `x` shadows a previous, unrelated binding 212 --> $DIR/shadow.rs:71:20 213 | 214LL | while let Some(x) = Some(1) {} 215 | ^ 216 | 217note: previous binding is here 218 --> $DIR/shadow.rs:62:9 219 | 220LL | let x = 1; 221 | ^ 222 223error: `x` shadows a previous, unrelated binding 224 --> $DIR/shadow.rs:72:15 225 | 226LL | let _ = |[x]: [u32; 1]| { 227 | ^ 228 | 229note: previous binding is here 230 --> $DIR/shadow.rs:62:9 231 | 232LL | let x = 1; 233 | ^ 234 235error: `x` shadows a previous, unrelated binding 236 --> $DIR/shadow.rs:73:13 237 | 238LL | let x = 1; 239 | ^ 240 | 241note: previous binding is here 242 --> $DIR/shadow.rs:72:15 243 | 244LL | let _ = |[x]: [u32; 1]| { 245 | ^ 246 247error: `y` is shadowed 248 --> $DIR/shadow.rs:76:17 249 | 250LL | if let Some(y) = y {} 251 | ^ 252 | 253note: previous binding is here 254 --> $DIR/shadow.rs:75:9 255 | 256LL | let y = Some(1); 257 | ^ 258 259error: `_b` shadows a previous, unrelated binding 260 --> $DIR/shadow.rs:112:9 261 | 262LL | let _b = _a; 263 | ^^ 264 | 265note: previous binding is here 266 --> $DIR/shadow.rs:111:28 267 | 268LL | pub async fn foo2(_a: i32, _b: i64) { 269 | ^^ 270 271error: `x` shadows a previous, unrelated binding 272 --> $DIR/shadow.rs:118:21 273 | 274LL | if let Some(x) = Some(1) { x } else { 1 } 275 | ^ 276 | 277note: previous binding is here 278 --> $DIR/shadow.rs:117:13 279 | 280LL | let x = 1; 281 | ^ 282 283error: aborting due to 23 previous errors 284