@@ -365,8 +365,7 @@ impl FromWithTcx<clean::GenericBound> for GenericBound {
365365 match bound {
366366 TraitBound ( clean:: PolyTrait { trait_, generic_params } , modifier) => {
367367 // FIXME: should `trait_` be a clean::Path equivalent in JSON?
368- let trait_ =
369- clean:: ResolvedPath { did : trait_. def_id ( ) , path : trait_ } . into_tcx ( tcx) ;
368+ let trait_ = clean:: ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
370369 GenericBound :: TraitBound {
371370 trait_,
372371 generic_params : generic_params. into_iter ( ) . map ( |x| x. into_tcx ( tcx) ) . collect ( ) ,
@@ -391,9 +390,9 @@ impl FromWithTcx<clean::Type> for Type {
391390 fn from_tcx ( ty : clean:: Type , tcx : TyCtxt < ' _ > ) -> Self {
392391 use clean:: Type :: * ;
393392 match ty {
394- ResolvedPath { path, did } => Type :: ResolvedPath {
393+ ResolvedPath { path } => Type :: ResolvedPath {
395394 name : path. whole_name ( ) ,
396- id : from_item_id ( did . into ( ) ) ,
395+ id : from_item_id ( path . def_id ( ) . into ( ) ) ,
397396 args : path. segments . last ( ) . map ( |args| Box :: new ( args. clone ( ) . args . into_tcx ( tcx) ) ) ,
398397 param_names : Vec :: new ( ) ,
399398 } ,
@@ -436,7 +435,7 @@ impl FromWithTcx<clean::Type> for Type {
436435 } ,
437436 QPath { name, self_type, trait_, .. } => {
438437 // FIXME: should `trait_` be a clean::Path equivalent in JSON?
439- let trait_ = ResolvedPath { did : trait_ . def_id ( ) , path : trait_ } . into_tcx ( tcx) ;
438+ let trait_ = ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
440439 Type :: QualifiedPath {
441440 name : name. to_string ( ) ,
442441 self_type : Box :: new ( ( * self_type) . into_tcx ( tcx) ) ,
@@ -502,10 +501,7 @@ impl FromWithTcx<clean::Impl> for Impl {
502501 let provided_trait_methods = impl_. provided_trait_methods ( tcx) ;
503502 let clean:: Impl { unsafety, generics, trait_, for_, items, polarity, kind } = impl_;
504503 // FIXME: should `trait_` be a clean::Path equivalent in JSON?
505- let trait_ = trait_. map ( |path| {
506- let did = path. def_id ( ) ;
507- clean:: ResolvedPath { path, did } . into_tcx ( tcx)
508- } ) ;
504+ let trait_ = trait_. map ( |path| clean:: ResolvedPath { path } . into_tcx ( tcx) ) ;
509505 // FIXME: use something like ImplKind in JSON?
510506 let ( synthetic, blanket_impl) = match kind {
511507 clean:: ImplKind :: Normal => ( false , None ) ,
0 commit comments