mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
Allow LocalDefId
as the argument to def_path_str
This commit is contained in:
parent
84bab312ab
commit
7f13e6d8a5
@ -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)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -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)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user