| error: `x` is shadowed by itself in `x` | |
| --> tests/ui/shadow.rs:19:9 | |
| | | |
| LL | let x = x; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:18:9 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| = note: `-D clippy::shadow-same` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::shadow_same)]` | |
| error: `mut x` is shadowed by itself in `&x` | |
| --> tests/ui/shadow.rs:21:13 | |
| | | |
| LL | let mut x = &x; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:19:9 | |
| | | |
| LL | let x = x; | |
| | ^ | |
| error: `x` is shadowed by itself in `&mut x` | |
| --> tests/ui/shadow.rs:23:9 | |
| | | |
| LL | let x = &mut x; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:21:9 | |
| | | |
| LL | let mut x = &x; | |
| | ^^^^^ | |
| error: `x` is shadowed by itself in `*x` | |
| --> tests/ui/shadow.rs:25:9 | |
| | | |
| LL | let x = *x; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:23:9 | |
| | | |
| LL | let x = &mut x; | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:31:9 | |
| | | |
| LL | let x = x.0; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:30:9 | |
| | | |
| LL | let x = ([[0]], ()); | |
| | ^ | |
| = note: `-D clippy::shadow-reuse` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::shadow_reuse)]` | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:33:9 | |
| | | |
| LL | let x = x[0]; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:31:9 | |
| | | |
| LL | let x = x.0; | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:35:10 | |
| | | |
| LL | let [x] = x; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:33:9 | |
| | | |
| LL | let x = x[0]; | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:37:9 | |
| | | |
| LL | let x = Some(x); | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:35:10 | |
| | | |
| LL | let [x] = x; | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:39:9 | |
| | | |
| LL | let x = foo(x); | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:37:9 | |
| | | |
| LL | let x = Some(x); | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:41:9 | |
| | | |
| LL | let x = || x; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:39:9 | |
| | | |
| LL | let x = foo(x); | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:43:9 | |
| | | |
| LL | let x = Some(1).map(|_| x)?; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:41:9 | |
| | | |
| LL | let x = || x; | |
| | ^ | |
| error: `y` is shadowed | |
| --> tests/ui/shadow.rs:46:9 | |
| | | |
| LL | let y = match y { | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:45:9 | |
| | | |
| LL | let y = 1; | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:62:9 | |
| | | |
| LL | let x = 2; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:61:9 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| = note: `-D clippy::shadow-unrelated` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::shadow_unrelated)]` | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:68:13 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:67:10 | |
| | | |
| LL | fn f(x: u32) { | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:74:14 | |
| | | |
| LL | Some(x) => { | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:71:9 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:76:17 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:74:14 | |
| | | |
| LL | Some(x) => { | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:81:17 | |
| | | |
| LL | if let Some(x) = Some(1) {} | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:71:9 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:83:20 | |
| | | |
| LL | while let Some(x) = Some(1) {} | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:71:9 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:85:15 | |
| | | |
| LL | let _ = |[x]: [u32; 1]| { | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:71:9 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:87:13 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:85:15 | |
| | | |
| LL | let _ = |[x]: [u32; 1]| { | |
| | ^ | |
| error: `y` is shadowed | |
| --> tests/ui/shadow.rs:91:17 | |
| | | |
| LL | if let Some(y) = y {} | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:90:9 | |
| | | |
| LL | let y = Some(1); | |
| | ^ | |
| error: `_b` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:128:9 | |
| | | |
| LL | let _b = _a; | |
| | ^^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:127:28 | |
| | | |
| LL | pub async fn foo2(_a: i32, _b: i64) { | |
| | ^^ | |
| error: `x` shadows a previous, unrelated binding | |
| --> tests/ui/shadow.rs:135:21 | |
| | | |
| LL | if let Some(x) = Some(1) { x } else { 1 } | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:134:13 | |
| | | |
| LL | let x = 1; | |
| | ^ | |
| error: `x` is shadowed | |
| --> tests/ui/shadow.rs:146:20 | |
| | | |
| LL | let z = x.map(|x| x + 1); | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:143:9 | |
| | | |
| LL | let x = Some(1); | |
| | ^ | |
| error: `i` is shadowed | |
| --> tests/ui/shadow.rs:151:25 | |
| | | |
| LL | .map(|i| i.map(|i| i - 10)) | |
| | ^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:151:15 | |
| | | |
| LL | .map(|i| i.map(|i| i - 10)) | |
| | ^ | |
| error: `value` is shadowed by itself in `value` | |
| --> tests/ui/shadow.rs:161:22 | |
| | | |
| LL | let Issue13795 { value, .. } = value; | |
| | ^^^^^ | |
| | | |
| note: previous binding is here | |
| --> tests/ui/shadow.rs:160:15 | |
| | | |
| LL | fn issue13795(value: Issue13795) { | |
| | ^^^^^ | |
| error: aborting due to 26 previous errors | |