Skip to content

Commit 7f13e6d

Browse files
committed
Allow LocalDefId as the argument to def_path_str
1 parent 84bab31 commit 7f13e6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/default_union_representation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl<'tcx> LateLintPass<'tcx> for DefaultUnionRepresentation {
6161
None,
6262
&format!(
6363
"consider annotating `{}` with `#[repr(C)]` to explicitly specify memory layout",
64-
cx.tcx.def_path_str(item.owner_id.to_def_id())
64+
cx.tcx.def_path_str(item.owner_id)
6565
),
6666
);
6767
}

clippy_lints/src/trailing_empty_array.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<'tcx> LateLintPass<'tcx> for TrailingEmptyArray {
4646
None,
4747
&format!(
4848
"consider annotating `{}` with `#[repr(C)]` or another `repr` attribute",
49-
cx.tcx.def_path_str(item.owner_id.to_def_id())
49+
cx.tcx.def_path_str(item.owner_id)
5050
),
5151
);
5252
}

0 commit comments

Comments
 (0)