File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/tools/clippy/clippy_lints/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,10 @@ impl<'tcx> LateLintPass<'tcx> for UndocumentedUnsafeBlocks {
256
256
cx,
257
257
UNNECESSARY_SAFETY_COMMENT ,
258
258
span,
259
- format ! ( "{} has unnecessary safety comment" , item. kind. descr( ) ) ,
259
+ format ! (
260
+ "{} has unnecessary safety comment" ,
261
+ cx. tcx. def_descr( item. owner_id. to_def_id( ) ) ,
262
+ ) ,
260
263
|diag| {
261
264
diag. span_help ( help_span, "consider removing the safety comment" ) ;
262
265
} ,
@@ -274,7 +277,10 @@ impl<'tcx> LateLintPass<'tcx> for UndocumentedUnsafeBlocks {
274
277
cx,
275
278
UNNECESSARY_SAFETY_COMMENT ,
276
279
span,
277
- format ! ( "{} has unnecessary safety comment" , item. kind. descr( ) ) ,
280
+ format ! (
281
+ "{} has unnecessary safety comment" ,
282
+ cx. tcx. def_descr( item. owner_id. to_def_id( ) ) ,
283
+ ) ,
278
284
|diag| {
279
285
diag. span_help ( help_span, "consider removing the safety comment" ) ;
280
286
} ,
You can’t perform that action at this time.
0 commit comments