]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/explicit_auto_deref.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / explicit_auto_deref.stderr
CommitLineData
064997fb 1error: deref which would be done by auto-deref
781aab86 2 --> $DIR/explicit_auto_deref.rs:68:19
064997fb
FG
3 |
4LL | let _: &str = &*s;
add651ee 5 | ^^^ help: try: `&s`
064997fb
FG
6 |
7 = note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
781aab86 8 = help: to override `-D warnings` add `#[allow(clippy::explicit_auto_deref)]`
064997fb
FG
9
10error: deref which would be done by auto-deref
781aab86 11 --> $DIR/explicit_auto_deref.rs:69:19
f2b60f7d
FG
12 |
13LL | let _: &str = &*{ String::new() };
add651ee 14 | ^^^^^^^^^^^^^^^^^^^ help: try: `&{ String::new() }`
f2b60f7d
FG
15
16error: deref which would be done by auto-deref
781aab86 17 --> $DIR/explicit_auto_deref.rs:70:19
f2b60f7d
FG
18 |
19LL | let _: &str = &mut *{ String::new() };
add651ee 20 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut { String::new() }`
f2b60f7d
FG
21
22error: deref which would be done by auto-deref
781aab86 23 --> $DIR/explicit_auto_deref.rs:74:11
064997fb
FG
24 |
25LL | f_str(&*s);
add651ee 26 | ^^^ help: try: `&s`
064997fb
FG
27
28error: deref which would be done by auto-deref
781aab86 29 --> $DIR/explicit_auto_deref.rs:78:13
064997fb
FG
30 |
31LL | f_str_t(&*s, &*s); // Don't lint second param.
add651ee 32 | ^^^ help: try: `&s`
064997fb
FG
33
34error: deref which would be done by auto-deref
781aab86 35 --> $DIR/explicit_auto_deref.rs:81:24
064997fb
FG
36 |
37LL | let _: &Box<i32> = &**b;
add651ee 38 | ^^^^ help: try: `&b`
064997fb
FG
39
40error: deref which would be done by auto-deref
781aab86 41 --> $DIR/explicit_auto_deref.rs:87:7
064997fb
FG
42 |
43LL | c(&*s);
add651ee 44 | ^^^ help: try: `&s`
064997fb
FG
45
46error: deref which would be done by auto-deref
781aab86 47 --> $DIR/explicit_auto_deref.rs:93:9
064997fb
FG
48 |
49LL | &**x
add651ee 50 | ^^^^ help: try: `x`
064997fb
FG
51
52error: deref which would be done by auto-deref
781aab86 53 --> $DIR/explicit_auto_deref.rs:97:11
064997fb
FG
54 |
55LL | { &**x }
add651ee 56 | ^^^^ help: try: `x`
064997fb
FG
57
58error: deref which would be done by auto-deref
781aab86 59 --> $DIR/explicit_auto_deref.rs:101:9
064997fb
FG
60 |
61LL | &**{ x }
add651ee 62 | ^^^^^^^^ help: try: `{ x }`
064997fb
FG
63
64error: deref which would be done by auto-deref
781aab86 65 --> $DIR/explicit_auto_deref.rs:105:9
064997fb
FG
66 |
67LL | &***x
add651ee 68 | ^^^^^ help: try: `x`
064997fb
FG
69
70error: deref which would be done by auto-deref
781aab86 71 --> $DIR/explicit_auto_deref.rs:122:12
064997fb
FG
72 |
73LL | f1(&*x);
add651ee 74 | ^^^ help: try: `&x`
064997fb
FG
75
76error: deref which would be done by auto-deref
781aab86 77 --> $DIR/explicit_auto_deref.rs:123:12
064997fb
FG
78 |
79LL | f2(&*x);
add651ee 80 | ^^^ help: try: `&x`
064997fb
FG
81
82error: deref which would be done by auto-deref
781aab86 83 --> $DIR/explicit_auto_deref.rs:124:12
064997fb
FG
84 |
85LL | f3(&*x);
add651ee 86 | ^^^ help: try: `&x`
064997fb
FG
87
88error: deref which would be done by auto-deref
781aab86 89 --> $DIR/explicit_auto_deref.rs:125:27
064997fb
FG
90 |
91LL | f4.callable_str()(&*x);
add651ee 92 | ^^^ help: try: `&x`
064997fb
FG
93
94error: deref which would be done by auto-deref
781aab86 95 --> $DIR/explicit_auto_deref.rs:126:12
064997fb
FG
96 |
97LL | f5(&*x);
add651ee 98 | ^^^ help: try: `&x`
064997fb
FG
99
100error: deref which would be done by auto-deref
781aab86 101 --> $DIR/explicit_auto_deref.rs:127:12
064997fb
FG
102 |
103LL | f6(&*x);
add651ee 104 | ^^^ help: try: `&x`
064997fb
FG
105
106error: deref which would be done by auto-deref
781aab86 107 --> $DIR/explicit_auto_deref.rs:128:27
064997fb
FG
108 |
109LL | f7.callable_str()(&*x);
add651ee 110 | ^^^ help: try: `&x`
064997fb
FG
111
112error: deref which would be done by auto-deref
781aab86 113 --> $DIR/explicit_auto_deref.rs:129:25
064997fb
FG
114 |
115LL | f8.callable_t()(&*x);
add651ee 116 | ^^^ help: try: `&x`
064997fb
FG
117
118error: deref which would be done by auto-deref
781aab86 119 --> $DIR/explicit_auto_deref.rs:130:12
064997fb
FG
120 |
121LL | f9(&*x);
add651ee 122 | ^^^ help: try: `&x`
064997fb
FG
123
124error: deref which would be done by auto-deref
781aab86 125 --> $DIR/explicit_auto_deref.rs:131:13
064997fb
FG
126 |
127LL | f10(&*x);
add651ee 128 | ^^^ help: try: `&x`
064997fb
FG
129
130error: deref which would be done by auto-deref
781aab86 131 --> $DIR/explicit_auto_deref.rs:132:26
064997fb
FG
132 |
133LL | f11.callable_t()(&*x);
add651ee 134 | ^^^ help: try: `&x`
064997fb
FG
135
136error: deref which would be done by auto-deref
781aab86 137 --> $DIR/explicit_auto_deref.rs:136:16
064997fb
FG
138 |
139LL | let _ = S1(&*s);
add651ee 140 | ^^^ help: try: `&s`
064997fb
FG
141
142error: deref which would be done by auto-deref
781aab86 143 --> $DIR/explicit_auto_deref.rs:141:21
064997fb
FG
144 |
145LL | let _ = S2 { s: &*s };
add651ee 146 | ^^^ help: try: `&s`
064997fb
FG
147
148error: deref which would be done by auto-deref
781aab86 149 --> $DIR/explicit_auto_deref.rs:157:30
064997fb
FG
150 |
151LL | let _ = Self::S1(&**s);
add651ee 152 | ^^^^ help: try: `s`
064997fb
FG
153
154error: deref which would be done by auto-deref
781aab86 155 --> $DIR/explicit_auto_deref.rs:158:35
064997fb
FG
156 |
157LL | let _ = Self::S2 { s: &**s };
add651ee 158 | ^^^^ help: try: `s`
064997fb
FG
159
160error: deref which would be done by auto-deref
781aab86 161 --> $DIR/explicit_auto_deref.rs:161:20
064997fb
FG
162 |
163LL | let _ = E1::S1(&*s);
add651ee 164 | ^^^ help: try: `&s`
064997fb
FG
165
166error: deref which would be done by auto-deref
781aab86 167 --> $DIR/explicit_auto_deref.rs:162:25
064997fb
FG
168 |
169LL | let _ = E1::S2 { s: &*s };
add651ee 170 | ^^^ help: try: `&s`
064997fb
FG
171
172error: deref which would be done by auto-deref
781aab86 173 --> $DIR/explicit_auto_deref.rs:180:13
064997fb
FG
174 |
175LL | let _ = (*b).foo;
add651ee 176 | ^^^^ help: try: `b`
064997fb
FG
177
178error: deref which would be done by auto-deref
781aab86 179 --> $DIR/explicit_auto_deref.rs:181:13
064997fb
FG
180 |
181LL | let _ = (**b).foo;
add651ee 182 | ^^^^^ help: try: `b`
064997fb
FG
183
184error: deref which would be done by auto-deref
781aab86 185 --> $DIR/explicit_auto_deref.rs:196:19
064997fb
FG
186 |
187LL | let _ = f_str(*ref_str);
add651ee 188 | ^^^^^^^^ help: try: `ref_str`
064997fb
FG
189
190error: deref which would be done by auto-deref
781aab86 191 --> $DIR/explicit_auto_deref.rs:198:19
064997fb
FG
192 |
193LL | let _ = f_str(**ref_ref_str);
add651ee 194 | ^^^^^^^^^^^^^ help: try: `ref_ref_str`
064997fb
FG
195
196error: deref which would be done by auto-deref
781aab86 197 --> $DIR/explicit_auto_deref.rs:208:12
064997fb
FG
198 |
199LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references
781aab86 200 | ^^^^^^^^^ help: try: `ref_str`
064997fb
FG
201
202error: deref which would be done by auto-deref
781aab86 203 --> $DIR/explicit_auto_deref.rs:209:12
064997fb
FG
204 |
205LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference
add651ee 206 | ^^^^^^^^^^ help: try: `ref_str`
064997fb
FG
207
208error: deref which would be done by auto-deref
781aab86 209 --> $DIR/explicit_auto_deref.rs:218:41
064997fb
FG
210 |
211LL | let _ = || -> &'static str { return *s };
add651ee 212 | ^^ help: try: `s`
064997fb 213
f2b60f7d 214error: deref which would be done by auto-deref
781aab86 215 --> $DIR/explicit_auto_deref.rs:237:9
f2b60f7d
FG
216 |
217LL | &**x
add651ee 218 | ^^^^ help: try: `x`
f2b60f7d
FG
219
220error: deref which would be done by auto-deref
781aab86 221 --> $DIR/explicit_auto_deref.rs:260:8
f2b60f7d
FG
222 |
223LL | c1(*x);
add651ee 224 | ^^ help: try: `x`
f2b60f7d
FG
225
226error: deref which would be done by auto-deref
781aab86 227 --> $DIR/explicit_auto_deref.rs:263:20
f2b60f7d
FG
228 |
229LL | return *x;
add651ee 230 | ^^ help: try: `x`
f2b60f7d
FG
231
232error: deref which would be done by auto-deref
781aab86 233 --> $DIR/explicit_auto_deref.rs:265:9
f2b60f7d
FG
234 |
235LL | *x
add651ee 236 | ^^ help: try: `x`
f2b60f7d 237
781aab86
FG
238error: deref which would be done by auto-deref
239 --> $DIR/explicit_auto_deref.rs:299:20
240 |
241LL | Some(x) => &mut *x,
242 | ^^^^^^^ help: try: `x`
243
244error: aborting due to 40 previous errors
064997fb 245