@@ -251,25 +251,17 @@ impl PrintContext {
251
251
fn parameterized < F : fmt:: Write > ( & mut self ,
252
252
f : & mut F ,
253
253
substs : & subst:: Substs < ' _ > ,
254
- mut did : DefId ,
254
+ did : DefId ,
255
255
projections : & [ ty:: ProjectionPredicate < ' _ > ] )
256
256
-> fmt:: Result {
257
257
let key = ty:: tls:: with ( |tcx| tcx. def_key ( did) ) ;
258
- let mut item_name = if let Some ( name) = key. disambiguated_data . data . get_opt_name ( ) {
259
- Some ( name)
260
- } else {
261
- did. index = key. parent . unwrap_or_else (
262
- || bug ! ( "finding type for {:?}, encountered def-id {:?} with no parent" ,
263
- did, did) ) ;
264
- self . parameterized ( f, substs, did, projections) ?;
265
- return write ! ( f, "::{}" , key. disambiguated_data. data. as_interned_str( ) ) ;
266
- } ;
267
258
268
259
let verbose = self . is_verbose ;
269
260
let mut num_supplied_defaults = 0 ;
270
261
let mut has_self = false ;
271
262
let mut own_counts: GenericParamCount = Default :: default ( ) ;
272
263
let mut is_value_path = false ;
264
+ let mut item_name = Some ( key. disambiguated_data . data . as_interned_str ( ) ) ;
273
265
let fn_trait_kind = ty:: tls:: with ( |tcx| {
274
266
// Unfortunately, some kinds of items (e.g., closures) don't have
275
267
// generics. So walk back up the find the closest parent that DOES
@@ -282,6 +274,7 @@ impl PrintContext {
282
274
DefPathData :: AssocTypeInImpl ( _) |
283
275
DefPathData :: AssocExistentialInImpl ( _) |
284
276
DefPathData :: Trait ( _) |
277
+ DefPathData :: Impl |
285
278
DefPathData :: TypeNs ( _) => {
286
279
break ;
287
280
}
@@ -292,7 +285,6 @@ impl PrintContext {
292
285
}
293
286
DefPathData :: CrateRoot |
294
287
DefPathData :: Misc |
295
- DefPathData :: Impl |
296
288
DefPathData :: Module ( _) |
297
289
DefPathData :: MacroDef ( _) |
298
290
DefPathData :: ClosureExpr |
0 commit comments