@@ -972,7 +972,7 @@ impl Clean<Item> for doctree::Trait {
972
972
973
973
impl Clean < Type > for ast:: TraitRef {
974
974
fn clean ( & self , cx : & DocContext ) -> Type {
975
- resolve_type ( cx, self . path . clean ( cx) , None , self . ref_id )
975
+ resolve_type ( cx, self . path . clean ( cx) , self . ref_id )
976
976
}
977
977
}
978
978
@@ -1258,8 +1258,19 @@ impl Clean<Type> for ast::Ty {
1258
1258
TyFixedLengthVec ( ref ty, ref e) => FixedVector ( box ty. clean ( cx) ,
1259
1259
e. span . to_src ( cx) ) ,
1260
1260
TyTup ( ref tys) => Tuple ( tys. clean ( cx) ) ,
1261
- TyPath ( ref p, ref tpbs, id) => {
1262
- resolve_type ( cx, p. clean ( cx) , tpbs. clean ( cx) , id)
1261
+ TyPath ( ref p, id) => {
1262
+ resolve_type ( cx, p. clean ( cx) , id)
1263
+ }
1264
+ TyObjectSum ( ref lhs, ref bounds) => {
1265
+ let lhs_ty = lhs. clean ( cx) ;
1266
+ match lhs_ty {
1267
+ ResolvedPath { path, typarams : None , did } => {
1268
+ ResolvedPath { path : path, typarams : Some ( bounds. clean ( cx) ) , did : did}
1269
+ }
1270
+ _ => {
1271
+ lhs_ty // shouldn't happen
1272
+ }
1273
+ }
1263
1274
}
1264
1275
TyClosure ( ref c) => Closure ( box c. clean ( cx) ) ,
1265
1276
TyProc ( ref c) => Proc ( box c. clean ( cx) ) ,
@@ -2110,8 +2121,8 @@ fn name_from_pat(p: &ast::Pat) -> String {
2110
2121
}
2111
2122
2112
2123
/// Given a Type, resolve it using the def_map
2113
- fn resolve_type ( cx : & DocContext , path : Path ,
2114
- tpbs : Option < Vec < TyParamBound > > ,
2124
+ fn resolve_type ( cx : & DocContext ,
2125
+ path : Path ,
2115
2126
id : ast:: NodeId ) -> Type {
2116
2127
let tcx = match cx. tcx_opt ( ) {
2117
2128
Some ( tcx) => tcx,
@@ -2148,7 +2159,7 @@ fn resolve_type(cx: &DocContext, path: Path,
2148
2159
_ => { }
2149
2160
} ;
2150
2161
let did = register_def ( & * cx, def) ;
2151
- ResolvedPath { path : path, typarams : tpbs , did : did }
2162
+ ResolvedPath { path : path, typarams : None , did : did }
2152
2163
}
2153
2164
2154
2165
fn register_def ( cx : & DocContext , def : def:: Def ) -> ast:: DefId {
0 commit comments