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