11error: unsafe block missing a safety comment
2- --> $DIR/undocumented_unsafe_blocks.rs:263 :19
2+ --> $DIR/undocumented_unsafe_blocks.rs:266 :19
33 |
44LL | /* Safety: */ unsafe {}
55 | ^^^^^^^^^
@@ -9,103 +9,103 @@ LL | /* Safety: */ unsafe {}
99 = help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
1010
1111error: unsafe block missing a safety comment
12- --> $DIR/undocumented_unsafe_blocks.rs:267 :5
12+ --> $DIR/undocumented_unsafe_blocks.rs:270 :5
1313 |
1414LL | unsafe {}
1515 | ^^^^^^^^^
1616 |
1717 = help: consider adding a safety comment on the preceding line
1818
1919error: unsafe block missing a safety comment
20- --> $DIR/undocumented_unsafe_blocks.rs:271 :14
20+ --> $DIR/undocumented_unsafe_blocks.rs:274 :14
2121 |
2222LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
2323 | ^^^^^^^^^^^^^
2424 |
2525 = help: consider adding a safety comment on the preceding line
2626
2727error: unsafe block missing a safety comment
28- --> $DIR/undocumented_unsafe_blocks.rs:271 :29
28+ --> $DIR/undocumented_unsafe_blocks.rs:274 :29
2929 |
3030LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
3131 | ^^^^^^^^^^^^^
3232 |
3333 = help: consider adding a safety comment on the preceding line
3434
3535error: unsafe block missing a safety comment
36- --> $DIR/undocumented_unsafe_blocks.rs:271 :48
36+ --> $DIR/undocumented_unsafe_blocks.rs:274 :48
3737 |
3838LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
3939 | ^^^^^^^^^^^^^
4040 |
4141 = help: consider adding a safety comment on the preceding line
4242
4343error: unsafe block missing a safety comment
44- --> $DIR/undocumented_unsafe_blocks.rs:275 :18
44+ --> $DIR/undocumented_unsafe_blocks.rs:278 :18
4545 |
4646LL | let _ = (42, unsafe {}, "test", unsafe {});
4747 | ^^^^^^^^^
4848 |
4949 = help: consider adding a safety comment on the preceding line
5050
5151error: unsafe block missing a safety comment
52- --> $DIR/undocumented_unsafe_blocks.rs:275 :37
52+ --> $DIR/undocumented_unsafe_blocks.rs:278 :37
5353 |
5454LL | let _ = (42, unsafe {}, "test", unsafe {});
5555 | ^^^^^^^^^
5656 |
5757 = help: consider adding a safety comment on the preceding line
5858
5959error: unsafe block missing a safety comment
60- --> $DIR/undocumented_unsafe_blocks.rs:279 :14
60+ --> $DIR/undocumented_unsafe_blocks.rs:282 :14
6161 |
6262LL | let _ = *unsafe { &42 };
6363 | ^^^^^^^^^^^^^^
6464 |
6565 = help: consider adding a safety comment on the preceding line
6666
6767error: unsafe block missing a safety comment
68- --> $DIR/undocumented_unsafe_blocks.rs:284 :19
68+ --> $DIR/undocumented_unsafe_blocks.rs:287 :19
6969 |
7070LL | let _ = match unsafe {} {
7171 | ^^^^^^^^^
7272 |
7373 = help: consider adding a safety comment on the preceding line
7474
7575error: unsafe block missing a safety comment
76- --> $DIR/undocumented_unsafe_blocks.rs:290 :14
76+ --> $DIR/undocumented_unsafe_blocks.rs:293 :14
7777 |
7878LL | let _ = &unsafe {};
7979 | ^^^^^^^^^
8080 |
8181 = help: consider adding a safety comment on the preceding line
8282
8383error: unsafe block missing a safety comment
84- --> $DIR/undocumented_unsafe_blocks.rs:294 :14
84+ --> $DIR/undocumented_unsafe_blocks.rs:297 :14
8585 |
8686LL | let _ = [unsafe {}; 5];
8787 | ^^^^^^^^^
8888 |
8989 = help: consider adding a safety comment on the preceding line
9090
9191error: unsafe block missing a safety comment
92- --> $DIR/undocumented_unsafe_blocks.rs:298 :13
92+ --> $DIR/undocumented_unsafe_blocks.rs:301 :13
9393 |
9494LL | let _ = unsafe {};
9595 | ^^^^^^^^^
9696 |
9797 = help: consider adding a safety comment on the preceding line
9898
9999error: unsafe block missing a safety comment
100- --> $DIR/undocumented_unsafe_blocks.rs:308 :8
100+ --> $DIR/undocumented_unsafe_blocks.rs:311 :8
101101 |
102102LL | t!(unsafe {});
103103 | ^^^^^^^^^
104104 |
105105 = help: consider adding a safety comment on the preceding line
106106
107107error: unsafe block missing a safety comment
108- --> $DIR/undocumented_unsafe_blocks.rs:314 :13
108+ --> $DIR/undocumented_unsafe_blocks.rs:317 :13
109109 |
110110LL | unsafe {}
111111 | ^^^^^^^^^
@@ -117,55 +117,55 @@ LL | t!();
117117 = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
118118
119119error: unsafe block missing a safety comment
120- --> $DIR/undocumented_unsafe_blocks.rs:322 :5
120+ --> $DIR/undocumented_unsafe_blocks.rs:325 :5
121121 |
122122LL | unsafe {} // SAFETY:
123123 | ^^^^^^^^^
124124 |
125125 = help: consider adding a safety comment on the preceding line
126126
127127error: unsafe block missing a safety comment
128- --> $DIR/undocumented_unsafe_blocks.rs:326 :5
128+ --> $DIR/undocumented_unsafe_blocks.rs:329 :5
129129 |
130130LL | unsafe {
131131 | ^^^^^^^^
132132 |
133133 = help: consider adding a safety comment on the preceding line
134134
135135error: unsafe block missing a safety comment
136- --> $DIR/undocumented_unsafe_blocks.rs:336 :5
136+ --> $DIR/undocumented_unsafe_blocks.rs:339 :5
137137 |
138138LL | unsafe {};
139139 | ^^^^^^^^^
140140 |
141141 = help: consider adding a safety comment on the preceding line
142142
143143error: unsafe block missing a safety comment
144- --> $DIR/undocumented_unsafe_blocks.rs:340 :20
144+ --> $DIR/undocumented_unsafe_blocks.rs:343 :20
145145 |
146146LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
147147 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148148 |
149149 = help: consider adding a safety comment on the preceding line
150150
151151error: unsafe impl missing a safety comment
152- --> $DIR/undocumented_unsafe_blocks.rs:347 :5
152+ --> $DIR/undocumented_unsafe_blocks.rs:350 :5
153153 |
154154LL | unsafe impl A for () {}
155155 | ^^^^^^^^^^^^^^^^^^^^^^^
156156 |
157157 = help: consider adding a safety comment on the preceding line
158158
159159error: unsafe impl missing a safety comment
160- --> $DIR/undocumented_unsafe_blocks.rs:354 :9
160+ --> $DIR/undocumented_unsafe_blocks.rs:357 :9
161161 |
162162LL | unsafe impl B for (u32) {}
163163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
164164 |
165165 = help: consider adding a safety comment on the preceding line
166166
167167error: unsafe impl missing a safety comment
168- --> $DIR/undocumented_unsafe_blocks.rs:375 :13
168+ --> $DIR/undocumented_unsafe_blocks.rs:378 :13
169169 |
170170LL | unsafe impl T for $t {}
171171 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -177,7 +177,7 @@ LL | no_safety_comment!(());
177177 = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
178178
179179error: unsafe impl missing a safety comment
180- --> $DIR/undocumented_unsafe_blocks.rs:400 :13
180+ --> $DIR/undocumented_unsafe_blocks.rs:403 :13
181181 |
182182LL | unsafe impl T for $t {}
183183 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -189,15 +189,15 @@ LL | no_safety_comment!(());
189189 = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
190190
191191error: unsafe impl missing a safety comment
192- --> $DIR/undocumented_unsafe_blocks.rs:408 :5
192+ --> $DIR/undocumented_unsafe_blocks.rs:411 :5
193193 |
194194LL | unsafe impl T for (i32) {}
195195 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
196196 |
197197 = help: consider adding a safety comment on the preceding line
198198
199199error: unsafe impl missing a safety comment
200- --> $DIR/undocumented_unsafe_blocks.rs:400 :13
200+ --> $DIR/undocumented_unsafe_blocks.rs:403 :13
201201 |
202202LL | unsafe impl T for $t {}
203203 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -209,77 +209,77 @@ LL | no_safety_comment!(u32);
209209 = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
210210
211211error: unsafe impl missing a safety comment
212- --> $DIR/undocumented_unsafe_blocks.rs:414 :5
212+ --> $DIR/undocumented_unsafe_blocks.rs:417 :5
213213 |
214214LL | unsafe impl T for (bool) {}
215215 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
216216 |
217217 = help: consider adding a safety comment on the preceding line
218218
219219error: unsafe impl missing a safety comment
220- --> $DIR/undocumented_unsafe_blocks.rs:460 :5
220+ --> $DIR/undocumented_unsafe_blocks.rs:463 :5
221221 |
222222LL | unsafe impl NoComment for () {}
223223 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224224 |
225225 = help: consider adding a safety comment on the preceding line
226226
227227error: unsafe impl missing a safety comment
228- --> $DIR/undocumented_unsafe_blocks.rs:464 :19
228+ --> $DIR/undocumented_unsafe_blocks.rs:467 :19
229229 |
230230LL | /* SAFETY: */ unsafe impl InlineComment for () {}
231231 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
232232 |
233233 = help: consider adding a safety comment on the preceding line
234234
235235error: unsafe impl missing a safety comment
236- --> $DIR/undocumented_unsafe_blocks.rs:468 :5
236+ --> $DIR/undocumented_unsafe_blocks.rs:471 :5
237237 |
238238LL | unsafe impl TrailingComment for () {} // SAFETY:
239239 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240240 |
241241 = help: consider adding a safety comment on the preceding line
242242
243243error: constant item has unnecessary safety comment
244- --> $DIR/undocumented_unsafe_blocks.rs:472 :5
244+ --> $DIR/undocumented_unsafe_blocks.rs:475 :5
245245 |
246246LL | const BIG_NUMBER: i32 = 1000000;
247247 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248248 |
249249help: consider removing the safety comment
250- --> $DIR/undocumented_unsafe_blocks.rs:471 :5
250+ --> $DIR/undocumented_unsafe_blocks.rs:474 :5
251251 |
252252LL | // SAFETY:
253253 | ^^^^^^^^^^
254254 = note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings`
255255 = help: to override `-D warnings` add `#[allow(clippy::unnecessary_safety_comment)]`
256256
257257error: unsafe impl missing a safety comment
258- --> $DIR/undocumented_unsafe_blocks.rs:473 :5
258+ --> $DIR/undocumented_unsafe_blocks.rs:476 :5
259259 |
260260LL | unsafe impl Interference for () {}
261261 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262262 |
263263 = help: consider adding a safety comment on the preceding line
264264
265265error: unsafe impl missing a safety comment
266- --> $DIR/undocumented_unsafe_blocks.rs:480 :5
266+ --> $DIR/undocumented_unsafe_blocks.rs:483 :5
267267 |
268268LL | unsafe impl ImplInFn for () {}
269269 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
270270 |
271271 = help: consider adding a safety comment on the preceding line
272272
273273error: unsafe impl missing a safety comment
274- --> $DIR/undocumented_unsafe_blocks.rs:489 :1
274+ --> $DIR/undocumented_unsafe_blocks.rs:492 :1
275275 |
276276LL | unsafe impl CrateRoot for () {}
277277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278278 |
279279 = help: consider adding a safety comment on the preceding line
280280
281281error: statement has unnecessary safety comment
282- --> $DIR/undocumented_unsafe_blocks.rs:502 :5
282+ --> $DIR/undocumented_unsafe_blocks.rs:505 :5
283283 |
284284LL | / let _ = {
285285LL | | if unsafe { true } {
@@ -291,21 +291,21 @@ LL | | };
291291 | |______^
292292 |
293293help: consider removing the safety comment
294- --> $DIR/undocumented_unsafe_blocks.rs:501 :5
294+ --> $DIR/undocumented_unsafe_blocks.rs:504 :5
295295 |
296296LL | // SAFETY: this is more than one level away, so it should warn
297297 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298298
299299error: unsafe block missing a safety comment
300- --> $DIR/undocumented_unsafe_blocks.rs:503 :12
300+ --> $DIR/undocumented_unsafe_blocks.rs:506 :12
301301 |
302302LL | if unsafe { true } {
303303 | ^^^^^^^^^^^^^^^
304304 |
305305 = help: consider adding a safety comment on the preceding line
306306
307307error: unsafe block missing a safety comment
308- --> $DIR/undocumented_unsafe_blocks.rs:506 :23
308+ --> $DIR/undocumented_unsafe_blocks.rs:509 :23
309309 |
310310LL | let bar = unsafe {};
311311 | ^^^^^^^^^
0 commit comments