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