@@ -438,28 +438,26 @@ impl Sig for ast::Item {
438
438
refs : vec ! [ ] ,
439
439
} )
440
440
}
441
- ast:: ItemKind :: OpaqueTy ( ref bounds , ref generics) => {
441
+ ast:: ItemKind :: Ty ( ref ty , ref generics) => {
442
442
let text = "type " . to_owned ( ) ;
443
443
let mut sig = name_and_generics ( text, offset, generics, self . id , self . ident , scx) ?;
444
444
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 ) ;
449
448
sig. text . push ( ';' ) ;
450
449
451
- Ok ( sig)
450
+ Ok ( merge_sigs ( sig. text . clone ( ) , vec ! [ sig , ty ] ) )
452
451
}
453
- ast:: ItemKind :: Ty ( ref ty , ref generics) => {
452
+ ast:: ItemKind :: OpaqueTy ( ref bounds , ref generics) => {
454
453
let text = "type " . to_owned ( ) ;
455
454
let mut sig = name_and_generics ( text, offset, generics, self . id , self . ident , scx) ?;
456
455
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) ) ;
460
458
sig. text . push ( ';' ) ;
461
459
462
- Ok ( merge_sigs ( sig. text . clone ( ) , vec ! [ sig , ty ] ) )
460
+ Ok ( sig)
463
461
}
464
462
ast:: ItemKind :: Enum ( _, ref generics) => {
465
463
let text = "enum " . to_owned ( ) ;
0 commit comments