@@ -365,7 +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_ = clean:: ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
368
+ let trait_ = clean:: Type :: ResolvedPath { path : trait_ } . into_tcx ( tcx) ;
369
369
GenericBound :: TraitBound {
370
370
trait_,
371
371
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
388
388
389
389
impl FromWithTcx < clean:: Type > for Type {
390
390
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
+
392
396
match ty {
393
- ResolvedPath { path } => Type :: ResolvedPath {
397
+ clean :: Type :: ResolvedPath { path } => Type :: ResolvedPath {
394
398
name : path. whole_name ( ) ,
395
399
id : from_item_id ( path. def_id ( ) . into ( ) ) ,
396
400
args : path. segments . last ( ) . map ( |args| Box :: new ( args. clone ( ) . args . into_tcx ( tcx) ) ) ,
@@ -435,7 +439,7 @@ impl FromWithTcx<clean::Type> for Type {
435
439
} ,
436
440
QPath { name, self_type, trait_, .. } => {
437
441
// 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) ;
439
443
Type :: QualifiedPath {
440
444
name : name. to_string ( ) ,
441
445
self_type : Box :: new ( ( * self_type) . into_tcx ( tcx) ) ,
@@ -501,7 +505,7 @@ impl FromWithTcx<clean::Impl> for Impl {
501
505
let provided_trait_methods = impl_. provided_trait_methods ( tcx) ;
502
506
let clean:: Impl { unsafety, generics, trait_, for_, items, polarity, kind } = impl_;
503
507
// 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) ) ;
505
509
// FIXME: use something like ImplKind in JSON?
506
510
let ( synthetic, blanket_impl) = match kind {
507
511
clean:: ImplKind :: Normal => ( false , None ) ,
0 commit comments