@@ -260,92 +260,32 @@ LL | unsafe impl Interference for () {}
260260 |
261261 = help: consider adding a safety comment on the preceding line
262262
263- error: constant item has unnecessary safety comment
264- --> $DIR/undocumented_unsafe_blocks.rs:477:5
265- |
266- LL | const CONST: u32 = 0;
267- | ^^^^^^^^^^^^^^^^^^^^^
268- |
269- help: consider removing the safety comment
270- --> $DIR/undocumented_unsafe_blocks.rs:476:5
271- |
272- LL | // SAFETY:
273- | ^^^^^^^^^^
274-
275- error: static item has unnecessary safety comment
276- --> $DIR/undocumented_unsafe_blocks.rs:479:5
277- |
278- LL | static STATIC: u32 = 0;
279- | ^^^^^^^^^^^^^^^^^^^^^^^
280- |
281- help: consider removing the safety comment
282- --> $DIR/undocumented_unsafe_blocks.rs:478:5
283- |
284- LL | // SAFETY:
285- | ^^^^^^^^^^
286-
287- error: struct has unnecessary safety comment
288- --> $DIR/undocumented_unsafe_blocks.rs:481:5
289- |
290- LL | struct Struct;
291- | ^^^^^^^^^^^^^^
292- |
293- help: consider removing the safety comment
294- --> $DIR/undocumented_unsafe_blocks.rs:480:5
295- |
296- LL | // SAFETY:
297- | ^^^^^^^^^^
298-
299- error: enum has unnecessary safety comment
300- --> $DIR/undocumented_unsafe_blocks.rs:483:5
301- |
302- LL | enum Enum {}
303- | ^^^^^^^^^^^^
304- |
305- help: consider removing the safety comment
306- --> $DIR/undocumented_unsafe_blocks.rs:482:5
307- |
308- LL | // SAFETY:
309- | ^^^^^^^^^^
310-
311- error: module has unnecessary safety comment
312- --> $DIR/undocumented_unsafe_blocks.rs:485:5
313- |
314- LL | mod module {}
315- | ^^^^^^^^^^^^^
316- |
317- help: consider removing the safety comment
318- --> $DIR/undocumented_unsafe_blocks.rs:484:5
319- |
320- LL | // SAFETY:
321- | ^^^^^^^^^^
322-
323263error: unsafe impl missing a safety comment
324- --> $DIR/undocumented_unsafe_blocks.rs:492 :5
264+ --> $DIR/undocumented_unsafe_blocks.rs:479 :5
325265 |
326266LL | unsafe impl ImplInFn for () {}
327267 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
328268 |
329269 = help: consider adding a safety comment on the preceding line
330270
331271error: unsafe impl missing a safety comment
332- --> $DIR/undocumented_unsafe_blocks.rs:501 :1
272+ --> $DIR/undocumented_unsafe_blocks.rs:488 :1
333273 |
334274LL | unsafe impl CrateRoot for () {}
335275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
336276 |
337277 = help: consider adding a safety comment on the preceding line
338278
339279error: unsafe block missing a safety comment
340- --> $DIR/undocumented_unsafe_blocks.rs:511 :9
280+ --> $DIR/undocumented_unsafe_blocks.rs:498 :9
341281 |
342282LL | unsafe {};
343283 | ^^^^^^^^^
344284 |
345285 = help: consider adding a safety comment on the preceding line
346286
347287error: statement has unnecessary safety comment
348- --> $DIR/undocumented_unsafe_blocks.rs:514 :5
288+ --> $DIR/undocumented_unsafe_blocks.rs:501 :5
349289 |
350290LL | / let _ = {
351291LL | | if unsafe { true } {
@@ -357,66 +297,26 @@ LL | | };
357297 | |______^
358298 |
359299help: consider removing the safety comment
360- --> $DIR/undocumented_unsafe_blocks.rs:513 :5
300+ --> $DIR/undocumented_unsafe_blocks.rs:500 :5
361301 |
362302LL | // SAFETY: this is more than one level away, so it should warn
363303 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
364304
365305error: unsafe block missing a safety comment
366- --> $DIR/undocumented_unsafe_blocks.rs:515 :12
306+ --> $DIR/undocumented_unsafe_blocks.rs:502 :12
367307 |
368308LL | if unsafe { true } {
369309 | ^^^^^^^^^^^^^^^
370310 |
371311 = help: consider adding a safety comment on the preceding line
372312
373313error: unsafe block missing a safety comment
374- --> $DIR/undocumented_unsafe_blocks.rs:518 :23
314+ --> $DIR/undocumented_unsafe_blocks.rs:505 :23
375315 |
376316LL | let bar = unsafe {};
377317 | ^^^^^^^^^
378318 |
379319 = help: consider adding a safety comment on the preceding line
380320
381- error: impl has unnecessary safety comment
382- --> $DIR/undocumented_unsafe_blocks.rs:541:13
383- |
384- LL | impl T for $t {}
385- | ^^^^^^^^^^^^^^^^
386- ...
387- LL | with_safety_comment!(i32);
388- | ------------------------- in this macro invocation
389- |
390- help: consider removing the safety comment
391- --> $DIR/undocumented_unsafe_blocks.rs:540:13
392- |
393- LL | // Safety: unnecessary
394- | ^^^^^^^^^^^^^^^^^^^^^^
395- = note: this error originates in the macro `with_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
396-
397- error: expression has unnecessary safety comment
398- --> $DIR/undocumented_unsafe_blocks.rs:553:5
399- |
400- LL | 24
401- | ^^
402- |
403- help: consider removing the safety comment
404- --> $DIR/undocumented_unsafe_blocks.rs:552:5
405- |
406- LL | // SAFETY: unnecessary
407- | ^^^^^^^^^^^^^^^^^^^^^^
408-
409- error: statement has unnecessary safety comment
410- --> $DIR/undocumented_unsafe_blocks.rs:550:5
411- |
412- LL | let num = 42;
413- | ^^^^^^^^^^^^^
414- |
415- help: consider removing the safety comment
416- --> $DIR/undocumented_unsafe_blocks.rs:549:5
417- |
418- LL | // SAFETY: unnecessary
419- | ^^^^^^^^^^^^^^^^^^^^^^
420-
421- error: aborting due to 44 previous errors
321+ error: aborting due to 36 previous errors
422322
0 commit comments