disambiguated_data: &DisambiguatedDefPathData,
) -> Result<Self::Path, Self::Error> {
let ns = match disambiguated_data.data {
- // FIXME: It shouldn't be necessary to add anything for extern block segments,
- // but we add 't' for backward compatibility.
- DefPathData::ForeignMod => 't',
+ // Extern block segments can be skipped, names from extern blocks
+ // are effectively living in their parent modules.
+ DefPathData::ForeignMod => return print_prefix(self),
// Uppercase categories are more stable than lowercase ones.
DefPathData::TypeNs(_) => 't',