@@ -438,28 +438,26 @@ impl Sig for ast::Item {
438438 refs : vec ! [ ] ,
439439 } )
440440 }
441- ast:: ItemKind :: OpaqueTy ( ref bounds , ref generics) => {
441+ ast:: ItemKind :: Ty ( ref ty , ref generics) => {
442442 let text = "type " . to_owned ( ) ;
443443 let mut sig = name_and_generics ( text, offset, generics, self . id , self . ident , scx) ?;
444444
445- if !bounds. is_empty ( ) {
446- sig. text . push_str ( " = impl " ) ;
447- sig. text . push_str ( & pprust:: bounds_to_string ( bounds) ) ;
448- }
445+ sig. text . push_str ( " = " ) ;
446+ let ty = ty. make ( offset + sig. text . len ( ) , id, scx) ?;
447+ sig. text . push_str ( & ty. text ) ;
449448 sig. text . push ( ';' ) ;
450449
451- Ok ( sig)
450+ Ok ( merge_sigs ( sig. text . clone ( ) , vec ! [ sig , ty ] ) )
452451 }
453- ast:: ItemKind :: Ty ( ref ty , ref generics) => {
452+ ast:: ItemKind :: OpaqueTy ( ref bounds , ref generics) => {
454453 let text = "type " . to_owned ( ) ;
455454 let mut sig = name_and_generics ( text, offset, generics, self . id , self . ident , scx) ?;
456455
457- sig. text . push_str ( " = " ) ;
458- let ty = ty. make ( offset + sig. text . len ( ) , id, scx) ?;
459- sig. text . push_str ( & ty. text ) ;
456+ sig. text . push_str ( " = impl " ) ;
457+ sig. text . push_str ( & pprust:: bounds_to_string ( bounds) ) ;
460458 sig. text . push ( ';' ) ;
461459
462- Ok ( merge_sigs ( sig. text . clone ( ) , vec ! [ sig , ty ] ) )
460+ Ok ( sig)
463461 }
464462 ast:: ItemKind :: Enum ( _, ref generics) => {
465463 let text = "enum " . to_owned ( ) ;
0 commit comments