Rollup merge of #92032 - petrochenkov:extblockpath, r=oli-obk
hir: Do not introduce dummy type names for `extern` blocks in def paths Use a separate nameless `DefPathData` variant instead. Extracted from https://github.com/rust-lang/rust/pull/91795.
This commit is contained in:
commit
5e8f934149
8 changed files with 36 additions and 31 deletions
|
@ -1030,8 +1030,8 @@ impl<'tcx> LateContext<'tcx> {
|
|||
) -> Result<Self::Path, Self::Error> {
|
||||
let mut path = print_prefix(self)?;
|
||||
|
||||
// Skip `::{{constructor}}` on tuple/unit structs.
|
||||
if let DefPathData::Ctor = disambiguated_data.data {
|
||||
// Skip `::{{extern}}` blocks and `::{{constructor}}` on tuple/unit structs.
|
||||
if let DefPathData::ForeignMod | DefPathData::Ctor = disambiguated_data.data {
|
||||
return Ok(path);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue