@@ -365,8 +365,7 @@ impl FromWithTcx<clean::GenericBound> for GenericBound {
365
365
match bound {
366
366
TraitBound ( clean:: PolyTrait { trait_, generic_params } , modifier) => {
367
367
// 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) ;
370
369
GenericBound :: TraitBound {
371
370
trait_,
372
371
generic_params : generic_params. into_iter ( ) . map ( |x| x. into_tcx ( tcx) ) . collect ( ) ,
@@ -391,9 +390,9 @@ impl FromWithTcx<clean::Type> for Type {
391
390
fn from_tcx ( ty : clean:: Type , tcx : TyCtxt < ' _ > ) -> Self {
392
391
use clean:: Type :: * ;
393
392
match ty {
394
- ResolvedPath { path, did } => Type :: ResolvedPath {
393
+ ResolvedPath { path } => Type :: ResolvedPath {
395
394
name : path. whole_name ( ) ,
396
- id : from_item_id ( did . into ( ) ) ,
395
+ id : from_item_id ( path . def_id ( ) . into ( ) ) ,
397
396
args : path. segments . last ( ) . map ( |args| Box :: new ( args. clone ( ) . args . into_tcx ( tcx) ) ) ,
398
397
param_names : Vec :: new ( ) ,
399
398
} ,
@@ -436,7 +435,7 @@ impl FromWithTcx<clean::Type> for Type {
436
435
} ,
437
436
QPath { name, self_type, trait_, .. } => {
438
437
// 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) ;
440
439
Type :: QualifiedPath {
441
440
name : name. to_string ( ) ,
442
441
self_type : Box :: new ( ( * self_type) . into_tcx ( tcx) ) ,
@@ -502,10 +501,7 @@ impl FromWithTcx<clean::Impl> for Impl {
502
501
let provided_trait_methods = impl_. provided_trait_methods ( tcx) ;
503
502
let clean:: Impl { unsafety, generics, trait_, for_, items, polarity, kind } = impl_;
504
503
// 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) ) ;
509
505
// FIXME: use something like ImplKind in JSON?
510
506
let ( synthetic, blanket_impl) = match kind {
511
507
clean:: ImplKind :: Normal => ( false , None ) ,
0 commit comments