@@ -365,7 +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_ = clean:: ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
368+ let trait_ = clean:: Type :: ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
369369 GenericBound :: TraitBound {
370370 trait_,
371371 generic_params : generic_params. into_iter ( ) . map ( |x| x. into_tcx ( tcx) ) . collect ( ) ,
@@ -388,9 +388,13 @@ crate fn from_trait_bound_modifier(modifier: rustc_hir::TraitBoundModifier) -> T
388388
389389impl FromWithTcx < clean:: Type > for Type {
390390 fn from_tcx ( ty : clean:: Type , tcx : TyCtxt < ' _ > ) -> Self {
391- use clean:: Type :: * ;
391+ use clean:: Type :: {
392+ Array , BareFunction , BorrowedRef , DynTrait , Generic , ImplTrait , Infer , Primitive ,
393+ QPath , RawPointer , Slice , Tuple ,
394+ } ;
395+
392396 match ty {
393- ResolvedPath { path } => Type :: ResolvedPath {
397+ clean :: Type :: ResolvedPath { path } => Type :: ResolvedPath {
394398 name : path. whole_name ( ) ,
395399 id : from_item_id ( path. def_id ( ) . into ( ) ) ,
396400 args : path. segments . last ( ) . map ( |args| Box :: new ( args. clone ( ) . args . into_tcx ( tcx) ) ) ,
@@ -435,7 +439,7 @@ impl FromWithTcx<clean::Type> for Type {
435439 } ,
436440 QPath { name, self_type, trait_, .. } => {
437441 // FIXME: should `trait_` be a clean::Path equivalent in JSON?
438- let trait_ = ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
442+ let trait_ = clean :: Type :: ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
439443 Type :: QualifiedPath {
440444 name : name. to_string ( ) ,
441445 self_type : Box :: new ( ( * self_type) . into_tcx ( tcx) ) ,
@@ -501,7 +505,7 @@ impl FromWithTcx<clean::Impl> for Impl {
501505 let provided_trait_methods = impl_. provided_trait_methods ( tcx) ;
502506 let clean:: Impl { unsafety, generics, trait_, for_, items, polarity, kind } = impl_;
503507 // FIXME: should `trait_` be a clean::Path equivalent in JSON?
504- let trait_ = trait_. map ( |path| clean:: ResolvedPath { path } . into_tcx ( tcx) ) ;
508+ let trait_ = trait_. map ( |path| clean:: Type :: ResolvedPath { path } . into_tcx ( tcx) ) ;
505509 // FIXME: use something like ImplKind in JSON?
506510 let ( synthetic, blanket_impl) = match kind {
507511 clean:: ImplKind :: Normal => ( false , None ) ,
0 commit comments