@@ -3,7 +3,7 @@ use std::sync::Arc;
33
44use log:: debug;
55
6- use chalk_ir:: { fold:: shift:: Shift , CanonicalVarKinds , GenericArg , TypeName } ;
6+ use chalk_ir:: { fold:: shift:: Shift , CanonicalVarKinds , GenericArg } ;
77use chalk_solve:: rust_ir:: { self , OpaqueTyDatumBound , WellKnownTrait } ;
88
99use base_db:: { salsa:: InternKey , CrateId } ;
@@ -81,7 +81,10 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
8181
8282 let ty: Ty = from_chalk ( self . db , parameters[ 0 ] . assert_ty_ref ( & Interner ) . clone ( ) ) ;
8383
84- fn binder_kind ( ty : & Ty , binders : & CanonicalVarKinds < Interner > ) -> Option < chalk_ir:: TyKind > {
84+ fn binder_kind (
85+ ty : & Ty ,
86+ binders : & CanonicalVarKinds < Interner > ,
87+ ) -> Option < chalk_ir:: TyVariableKind > {
8588 if let Ty :: Bound ( bv) = ty {
8689 let binders = binders. as_slice ( & Interner ) ;
8790 if bv. debruijn == DebruijnIndex :: INNERMOST {
@@ -95,8 +98,8 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
9598
9699 let self_ty_fp = TyFingerprint :: for_impl ( & ty) ;
97100 let fps: & [ TyFingerprint ] = match binder_kind ( & ty, binders) {
98- Some ( chalk_ir:: TyKind :: Integer ) => & ALL_INT_FPS ,
99- Some ( chalk_ir:: TyKind :: Float ) => & ALL_FLOAT_FPS ,
101+ Some ( chalk_ir:: TyVariableKind :: Integer ) => & ALL_INT_FPS ,
102+ Some ( chalk_ir:: TyVariableKind :: Float ) => & ALL_FLOAT_FPS ,
100103 _ => self_ty_fp. as_ref ( ) . map ( std:: slice:: from_ref) . unwrap_or ( & [ ] ) ,
101104 } ;
102105
@@ -129,12 +132,8 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
129132 debug ! ( "impls_for_trait returned {} impls" , result. len( ) ) ;
130133 result
131134 }
132- fn impl_provided_for (
133- & self ,
134- auto_trait_id : TraitId ,
135- application_ty : & chalk_ir:: ApplicationTy < Interner > ,
136- ) -> bool {
137- debug ! ( "impl_provided_for {:?}, {:?}" , auto_trait_id, application_ty) ;
135+ fn impl_provided_for ( & self , auto_trait_id : TraitId , kind : & chalk_ir:: TyKind < Interner > ) -> bool {
136+ debug ! ( "impl_provided_for {:?}, {:?}" , auto_trait_id, kind) ;
138137 false // FIXME
139138 }
140139 fn associated_ty_value ( & self , id : AssociatedTyValueId ) -> Arc < AssociatedTyValue > {
@@ -466,7 +465,7 @@ pub(crate) fn struct_datum_query(
466465 struct_id : AdtId ,
467466) -> Arc < StructDatum > {
468467 debug ! ( "struct_datum {:?}" , struct_id) ;
469- let type_ctor: TypeCtor = from_chalk ( db, TypeName :: Adt ( struct_id) ) ;
468+ let type_ctor = TypeCtor :: Adt ( from_chalk ( db, struct_id) ) ;
470469 debug ! ( "struct {:?} = {:?}" , struct_id, type_ctor) ;
471470 let num_params = type_ctor. num_ty_params ( db) ;
472471 let upstream = type_ctor. krate ( db) != Some ( krate) ;
0 commit comments