Right now astconv::associated_path_def_to_ty takes a def::TyParamProvenance obtained from either def::DefTyParam or def::DefSelfTy.
This information cannot be easily extracted from the type, and #22172 doesn't change that, which means <T>::AssocTy does not work at all (pretends to be ambiguous).
We should be able to make progress after #22172 and #22512 both land, and I believe @nikomatsakis has a solution in mind for dealing with at least some cases.
After this is fixed, the finish_resolving_def_to_ty function introduced in #22172 can be split into def_to_ty and resolve_extra_associated_types and its callers would only need the latter for <T>::A::B::C, instead of providing a dummy Def to the entire thing.
Right now
astconv::associated_path_def_to_tytakes adef::TyParamProvenanceobtained from eitherdef::DefTyParamordef::DefSelfTy.This information cannot be easily extracted from the type, and #22172 doesn't change that, which means
<T>::AssocTydoes not work at all (pretends to be ambiguous).We should be able to make progress after #22172 and #22512 both land, and I believe @nikomatsakis has a solution in mind for dealing with at least some cases.
After this is fixed, the
finish_resolving_def_to_tyfunction introduced in #22172 can be split intodef_to_tyandresolve_extra_associated_typesand its callers would only need the latter for<T>::A::B::C, instead of providing a dummyDefto the entire thing.