]> git.lizzy.rs Git - rust.git/blob - tests/ui/shadow.stderr
Merge pull request #1520 from Manishearth/rustup
[rust.git] / tests / ui / shadow.stderr
1 error: `x` is shadowed by itself in `&mut x`
2   --> $DIR/shadow.rs:13:9
3    |
4 13 |     let x = &mut x;
5    |         ^^^^^^^^^^
6    |
7    = note: #[deny(shadow_same)] implied by #[deny(clippy_pedantic)]
8 note: lint level defined here
9   --> $DIR/shadow.rs:4:17
10    |
11 4  | #![deny(clippy, clippy_pedantic)]
12    |                 ^^^^^^^^^^^^^^^
13 note: previous binding is here
14   --> $DIR/shadow.rs:12:13
15    |
16 12 |     let mut x = 1;
17    |             ^
18
19 error: `x` is shadowed by itself in `{ x }`
20   --> $DIR/shadow.rs:14:9
21    |
22 14 |     let x = { x };
23    |         ^^^^^^^^^
24    |
25    = note: #[deny(shadow_same)] implied by #[deny(clippy_pedantic)]
26 note: previous binding is here
27   --> $DIR/shadow.rs:13:9
28    |
29 13 |     let x = &mut x;
30    |         ^
31
32 error: `x` is shadowed by itself in `(&*x)`
33   --> $DIR/shadow.rs:15:9
34    |
35 15 |     let x = (&*x);
36    |         ^^^^^^^^^
37    |
38    = note: #[deny(shadow_same)] implied by #[deny(clippy_pedantic)]
39 note: previous binding is here
40   --> $DIR/shadow.rs:14:9
41    |
42 14 |     let x = { x };
43    |         ^
44
45 error: `x` is shadowed by `{ *x + 1 }` which reuses the original value
46   --> $DIR/shadow.rs:16:9
47    |
48 16 |     let x = { *x + 1 };
49    |         ^
50    |
51    = note: #[deny(shadow_reuse)] implied by #[deny(clippy_pedantic)]
52 note: lint level defined here
53   --> $DIR/shadow.rs:4:17
54    |
55 4  | #![deny(clippy, clippy_pedantic)]
56    |                 ^^^^^^^^^^^^^^^
57 note: initialization happens here
58   --> $DIR/shadow.rs:16:13
59    |
60 16 |     let x = { *x + 1 };
61    |             ^^^^^^^^^^
62 note: previous binding is here
63   --> $DIR/shadow.rs:15:9
64    |
65 15 |     let x = (&*x);
66    |         ^
67
68 error: `x` is shadowed by `id(x)` which reuses the original value
69   --> $DIR/shadow.rs:17:9
70    |
71 17 |     let x = id(x);
72    |         ^
73    |
74    = note: #[deny(shadow_reuse)] implied by #[deny(clippy_pedantic)]
75 note: initialization happens here
76   --> $DIR/shadow.rs:17:13
77    |
78 17 |     let x = id(x);
79    |             ^^^^^
80 note: previous binding is here
81   --> $DIR/shadow.rs:16:9
82    |
83 16 |     let x = { *x + 1 };
84    |         ^
85
86 error: `x` is shadowed by `(1, x)` which reuses the original value
87   --> $DIR/shadow.rs:18:9
88    |
89 18 |     let x = (1, x);
90    |         ^
91    |
92    = note: #[deny(shadow_reuse)] implied by #[deny(clippy_pedantic)]
93 note: initialization happens here
94   --> $DIR/shadow.rs:18:13
95    |
96 18 |     let x = (1, x);
97    |             ^^^^^^
98 note: previous binding is here
99   --> $DIR/shadow.rs:17:9
100    |
101 17 |     let x = id(x);
102    |         ^
103
104 error: `x` is shadowed by `first(x)` which reuses the original value
105   --> $DIR/shadow.rs:19:9
106    |
107 19 |     let x = first(x);
108    |         ^
109    |
110    = note: #[deny(shadow_reuse)] implied by #[deny(clippy_pedantic)]
111 note: initialization happens here
112   --> $DIR/shadow.rs:19:13
113    |
114 19 |     let x = first(x);
115    |             ^^^^^^^^
116 note: previous binding is here
117   --> $DIR/shadow.rs:18:9
118    |
119 18 |     let x = (1, x);
120    |         ^
121
122 error: `x` is shadowed by `y`
123   --> $DIR/shadow.rs:21:9
124    |
125 21 |     let x = y;
126    |         ^
127    |
128    = note: #[deny(shadow_unrelated)] implied by #[deny(clippy_pedantic)]
129 note: lint level defined here
130   --> $DIR/shadow.rs:4:17
131    |
132 4  | #![deny(clippy, clippy_pedantic)]
133    |                 ^^^^^^^^^^^^^^^
134 note: initialization happens here
135   --> $DIR/shadow.rs:21:13
136    |
137 21 |     let x = y;
138    |             ^
139 note: previous binding is here
140   --> $DIR/shadow.rs:19:9
141    |
142 19 |     let x = first(x);
143    |         ^
144
145 error: `x` shadows a previous declaration
146   --> $DIR/shadow.rs:23:9
147    |
148 23 |     let x;
149    |         ^
150    |
151    = note: #[deny(shadow_unrelated)] implied by #[deny(clippy_pedantic)]
152 note: previous binding is here
153   --> $DIR/shadow.rs:21:9
154    |
155 21 |     let x = y;
156    |         ^
157
158 error: aborting due to 9 previous errors
159