- let mut key = self.tcx.def_key(def_id);
- let is_value_ns = match key.disambiguated_data.data {
- DefPathData::ValueNs(_) |
- DefPathData::EnumVariant(_) => true,
-
- // Skip `StructCtor` so that `Struct::<T>` will be printed,
- // instead of the less pretty `Struct<T>::{{constructor}}`.
- DefPathData::StructCtor => {
- def_id.index = key.parent.unwrap();
- key = self.tcx.def_key(def_id);
- true
- }
-
- _ => false,
- };
-