Allow LocalDefId as the argument to def_path_str

This commit is contained in:
Oli Scherer 2023-02-16 09:25:11 +00:00
parent 84bab312ab
commit 7f13e6d8a5
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ impl<'tcx> LateLintPass<'tcx> for DefaultUnionRepresentation {
None,
&format!(
"consider annotating `{}` with `#[repr(C)]` to explicitly specify memory layout",
cx.tcx.def_path_str(item.owner_id.to_def_id())
cx.tcx.def_path_str(item.owner_id)
),
);
}

View File

@ -46,7 +46,7 @@ impl<'tcx> LateLintPass<'tcx> for TrailingEmptyArray {
None,
&format!(
"consider annotating `{}` with `#[repr(C)]` or another `repr` attribute",
cx.tcx.def_path_str(item.owner_id.to_def_id())
cx.tcx.def_path_str(item.owner_id)
),
);
}