@@ -1149,8 +1149,32 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> {
1149
1149
& trait_item. attrs ,
1150
1150
trait_item. span ) ;
1151
1151
}
1152
- ast:: TraitItemKind :: Const ( _, None ) |
1153
- ast:: TraitItemKind :: Type ( ..) |
1152
+ ast:: TraitItemKind :: Type ( ref _bounds, ref default_ty) => {
1153
+ // FIXME do something with _bounds (for type refs)
1154
+ let name = trait_item. ident . name . to_string ( ) ;
1155
+ let qualname = format ! ( "::{}" , self . tcx. node_path_str( trait_item. id) ) ;
1156
+ let sub_span = self . span . sub_span_after_keyword ( trait_item. span , keywords:: Type ) ;
1157
+
1158
+ if !self . span . filter_generated ( sub_span, trait_item. span ) {
1159
+ self . dumper . typedef ( TypeDefData {
1160
+ span : sub_span. expect ( "No span found for assoc type" ) ,
1161
+ name : name,
1162
+ id : trait_item. id ,
1163
+ qualname : qualname,
1164
+ value : self . span . snippet ( trait_item. span ) ,
1165
+ visibility : Visibility :: Public ,
1166
+ parent : Some ( trait_id) ,
1167
+ docs : docs_for_attrs ( & trait_item. attrs ) ,
1168
+ sig : None ,
1169
+ attributes : trait_item. attrs . clone ( ) ,
1170
+ } . lower ( self . tcx ) ) ;
1171
+ }
1172
+
1173
+ if let & Some ( ref default_ty) = default_ty {
1174
+ self . visit_ty ( default_ty)
1175
+ }
1176
+ }
1177
+ ast:: TraitItemKind :: Const ( ref ty, None ) => self . visit_ty ( ty) ,
1154
1178
ast:: TraitItemKind :: Macro ( _) => { }
1155
1179
}
1156
1180
}
@@ -1177,7 +1201,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> {
1177
1201
& impl_item. attrs ,
1178
1202
impl_item. span ) ;
1179
1203
}
1180
- ast:: ImplItemKind :: Type ( _ ) |
1204
+ ast:: ImplItemKind :: Type ( ref ty ) => self . visit_ty ( ty ) ,
1181
1205
ast:: ImplItemKind :: Macro ( _) => { }
1182
1206
}
1183
1207
}
0 commit comments