]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: `x` is shadowed by itself in `&mut x` |
2 | --> $DIR/shadow.rs:27:5 | |
3 | | | |
4 | LL | let x = &mut x; | |
5 | | ^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `-D clippy::shadow-same` implied by `-D warnings` | |
8 | note: previous binding is here | |
9 | --> $DIR/shadow.rs:26:13 | |
10 | | | |
11 | LL | let mut x = 1; | |
12 | | ^ | |
13 | ||
14 | error: `x` is shadowed by itself in `{ x }` | |
15 | --> $DIR/shadow.rs:28:5 | |
16 | | | |
17 | LL | let x = { x }; | |
18 | | ^^^^^^^^^^^^^^ | |
19 | | | |
20 | note: previous binding is here | |
21 | --> $DIR/shadow.rs:27:9 | |
22 | | | |
23 | LL | let x = &mut x; | |
24 | | ^ | |
25 | ||
26 | error: `x` is shadowed by itself in `(&*x)` | |
27 | --> $DIR/shadow.rs:29:5 | |
28 | | | |
29 | LL | let x = (&*x); | |
30 | | ^^^^^^^^^^^^^^ | |
31 | | | |
32 | note: previous binding is here | |
33 | --> $DIR/shadow.rs:28:9 | |
34 | | | |
35 | LL | let x = { x }; | |
36 | | ^ | |
37 | ||
38 | error: `x` is shadowed by `{ *x + 1 }` which reuses the original value | |
39 | --> $DIR/shadow.rs:30:9 | |
40 | | | |
41 | LL | let x = { *x + 1 }; | |
42 | | ^ | |
43 | | | |
44 | = note: `-D clippy::shadow-reuse` implied by `-D warnings` | |
45 | note: initialization happens here | |
46 | --> $DIR/shadow.rs:30:13 | |
47 | | | |
48 | LL | let x = { *x + 1 }; | |
49 | | ^^^^^^^^^^ | |
50 | note: previous binding is here | |
51 | --> $DIR/shadow.rs:29:9 | |
52 | | | |
53 | LL | let x = (&*x); | |
54 | | ^ | |
55 | ||
56 | error: `x` is shadowed by `id(x)` which reuses the original value | |
57 | --> $DIR/shadow.rs:31:9 | |
58 | | | |
59 | LL | let x = id(x); | |
60 | | ^ | |
61 | | | |
62 | note: initialization happens here | |
63 | --> $DIR/shadow.rs:31:13 | |
64 | | | |
65 | LL | let x = id(x); | |
66 | | ^^^^^ | |
67 | note: previous binding is here | |
68 | --> $DIR/shadow.rs:30:9 | |
69 | | | |
70 | LL | let x = { *x + 1 }; | |
71 | | ^ | |
72 | ||
73 | error: `x` is shadowed by `(1, x)` which reuses the original value | |
74 | --> $DIR/shadow.rs:32:9 | |
75 | | | |
76 | LL | let x = (1, x); | |
77 | | ^ | |
78 | | | |
79 | note: initialization happens here | |
80 | --> $DIR/shadow.rs:32:13 | |
81 | | | |
82 | LL | let x = (1, x); | |
83 | | ^^^^^^ | |
84 | note: previous binding is here | |
85 | --> $DIR/shadow.rs:31:9 | |
86 | | | |
87 | LL | let x = id(x); | |
88 | | ^ | |
89 | ||
90 | error: `x` is shadowed by `first(x)` which reuses the original value | |
91 | --> $DIR/shadow.rs:33:9 | |
92 | | | |
93 | LL | let x = first(x); | |
94 | | ^ | |
95 | | | |
96 | note: initialization happens here | |
97 | --> $DIR/shadow.rs:33:13 | |
98 | | | |
99 | LL | let x = first(x); | |
100 | | ^^^^^^^^ | |
101 | note: previous binding is here | |
102 | --> $DIR/shadow.rs:32:9 | |
103 | | | |
104 | LL | let x = (1, x); | |
105 | | ^ | |
106 | ||
107 | error: `x` is being shadowed | |
108 | --> $DIR/shadow.rs:35:9 | |
109 | | | |
110 | LL | let x = y; | |
111 | | ^ | |
112 | | | |
113 | = note: `-D clippy::shadow-unrelated` implied by `-D warnings` | |
114 | note: initialization happens here | |
115 | --> $DIR/shadow.rs:35:13 | |
116 | | | |
117 | LL | let x = y; | |
118 | | ^ | |
119 | note: previous binding is here | |
120 | --> $DIR/shadow.rs:33:9 | |
121 | | | |
122 | LL | let x = first(x); | |
123 | | ^ | |
124 | ||
125 | error: `x` shadows a previous declaration | |
126 | --> $DIR/shadow.rs:37:5 | |
127 | | | |
128 | LL | let x; | |
129 | | ^^^^^^ | |
130 | | | |
131 | note: previous binding is here | |
132 | --> $DIR/shadow.rs:35:9 | |
133 | | | |
134 | LL | let x = y; | |
135 | | ^ | |
136 | ||
137 | error: aborting due to 9 previous errors | |
138 |