@@ -260,45 +260,105 @@ LL | unsafe impl Interference for () {}
260260 |
261261 = help: consider adding a safety comment on the preceding line
262262
263- error: unsafe impl missing a safety comment
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
264276 --> $DIR/undocumented_unsafe_blocks.rs:479:5
265277 |
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+
323+ error: unsafe impl missing a safety comment
324+ --> $DIR/undocumented_unsafe_blocks.rs:492:5
325+ |
266326LL | unsafe impl ImplInFn for () {}
267327 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
268328 |
269329 = help: consider adding a safety comment on the preceding line
270330
271331error: unsafe impl missing a safety comment
272- --> $DIR/undocumented_unsafe_blocks.rs:488 :1
332+ --> $DIR/undocumented_unsafe_blocks.rs:501 :1
273333 |
274334LL | unsafe impl CrateRoot for () {}
275335 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276336 |
277337 = help: consider adding a safety comment on the preceding line
278338
279339error: unsafe block missing a safety comment
280- --> $DIR/undocumented_unsafe_blocks.rs:498 :9
340+ --> $DIR/undocumented_unsafe_blocks.rs:511 :9
281341 |
282342LL | unsafe {};
283343 | ^^^^^^^^^
284344 |
285345 = help: consider adding a safety comment on the preceding line
286346
287347error: unsafe block missing a safety comment
288- --> $DIR/undocumented_unsafe_blocks.rs:502 :12
348+ --> $DIR/undocumented_unsafe_blocks.rs:515 :12
289349 |
290350LL | if unsafe { true } {
291351 | ^^^^^^^^^^^^^^^
292352 |
293353 = help: consider adding a safety comment on the preceding line
294354
295355error: unsafe block missing a safety comment
296- --> $DIR/undocumented_unsafe_blocks.rs:505 :23
356+ --> $DIR/undocumented_unsafe_blocks.rs:518 :23
297357 |
298358LL | let bar = unsafe {};
299359 | ^^^^^^^^^
300360 |
301361 = help: consider adding a safety comment on the preceding line
302362
303- error: aborting due to 35 previous errors
363+ error: aborting due to 40 previous errors
304364
0 commit comments