@@ -574,6 +574,14 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
574
574
constraint. ident ,
575
575
path_span,
576
576
Some ( constraint) ,
577
+ )
578
+ . select_bound (
579
+ self ,
580
+ AssocItemQSelf :: Trait ( trait_ref. def_id ( ) ) ,
581
+ assoc_tag,
582
+ constraint. ident ,
583
+ path_span,
584
+ Some ( constraint) ,
577
585
) ?
578
586
} ;
579
587
@@ -825,42 +833,46 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
825
833
} ) =>
826
834
{
827
835
let self_ty = self . lower_ty ( hir_self_ty) ;
828
- let ( item_def_id, bound) = match self . resolve_type_relative_path (
829
- self_ty,
830
- hir_self_ty,
831
- ty:: AssocTag :: Fn ,
832
- segment,
833
- hir_ty. hir_id ,
834
- hir_ty. span ,
835
- None ,
836
- ) {
837
- Ok ( result) => result,
838
- Err ( guar) => return Ty :: new_error ( tcx, guar) ,
839
- } ;
836
+
837
+ // FIXME(unresolved_aliases): Force a resolution here
838
+ todo ! ( )
839
+
840
+ // let (item_def_id, bound) = match self.resolve_type_relative_path(
841
+ // self_ty,
842
+ // hir_self_ty,
843
+ // ty::AssocTag::Fn,
844
+ // segment,
845
+ // hir_ty.hir_id,
846
+ // hir_ty.span,
847
+ // None,
848
+ // ) {
849
+ // Ok(result) => result,
850
+ // Err(guar) => return Ty::new_error(tcx, guar),
851
+ // };
840
852
841
853
// Don't let `T::method` resolve to some `for<'a> <T as Tr<'a>>::method`,
842
854
// which may happen via a higher-ranked where clause or supertrait.
843
855
// This is the same restrictions as associated types; even though we could
844
856
// support it, it just makes things a lot more difficult to support in
845
857
// `resolve_bound_vars`, since we'd need to introduce those as elided
846
858
// bound vars on the where clause too.
847
- if bound. has_bound_vars ( ) {
848
- return Ty :: new_error (
849
- tcx,
850
- self . dcx ( ) . emit_err ( errors:: AssociatedItemTraitUninferredGenericParams {
851
- span : hir_ty. span ,
852
- inferred_sugg : Some ( hir_ty. span . with_hi ( segment. ident . span . lo ( ) ) ) ,
853
- bound : format ! ( "{}::" , tcx. anonymize_bound_vars( bound) . skip_binder( ) ) ,
854
- mpart_sugg : None ,
855
- what : tcx. def_descr ( item_def_id) ,
856
- } ) ,
857
- ) ;
858
- }
859
-
860
- match self . lower_return_type_notation_ty ( bound, item_def_id, hir_ty. span ) {
861
- Ok ( ty) => Ty :: new_alias ( tcx, ty:: Projection , ty) ,
862
- Err ( guar) => Ty :: new_error ( tcx, guar) ,
863
- }
859
+ // if bound.has_bound_vars() {
860
+ // return Ty::new_error(
861
+ // tcx,
862
+ // self.dcx().emit_err(errors::AssociatedItemTraitUninferredGenericParams {
863
+ // span: hir_ty.span,
864
+ // inferred_sugg: Some(hir_ty.span.with_hi(segment.ident.span.lo())),
865
+ // bound: format!("{}::", tcx.anonymize_bound_vars(bound).skip_binder()),
866
+ // mpart_sugg: None,
867
+ // what: tcx.def_descr(item_def_id),
868
+ // }),
869
+ // );
870
+ // }
871
+
872
+ // match self.lower_return_type_notation_ty(bound, item_def_id, hir_ty.span) {
873
+ // Ok(ty) => Ty::new_alias(tcx, ty::Projection, ty),
874
+ // Err(guar) => Ty::new_error(tcx, guar),
875
+ // }
864
876
}
865
877
_ => self . lower_ty ( hir_ty) ,
866
878
}
0 commit comments