Make impl_trait_in_trait_container consider newly generated RPITITs
This commit is contained in:
parent
39ffe9699a
commit
39d19ca9f2
1 changed files with 10 additions and 4 deletions
|
@ -2553,11 +2553,17 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn impl_trait_in_trait_parent_fn(self, mut def_id: DefId) -> DefId {
|
pub fn impl_trait_in_trait_parent_fn(self, mut def_id: DefId) -> DefId {
|
||||||
while let def_kind = self.def_kind(def_id) && def_kind != DefKind::AssocFn {
|
match self.opt_rpitit_info(def_id) {
|
||||||
debug_assert_eq!(def_kind, DefKind::ImplTraitPlaceholder);
|
Some(ImplTraitInTraitData::Trait { fn_def_id, .. })
|
||||||
def_id = self.parent(def_id);
|
| Some(ImplTraitInTraitData::Impl { fn_def_id, .. }) => fn_def_id,
|
||||||
|
None => {
|
||||||
|
while let def_kind = self.def_kind(def_id) && def_kind != DefKind::AssocFn {
|
||||||
|
debug_assert_eq!(def_kind, DefKind::ImplTraitPlaceholder);
|
||||||
|
def_id = self.parent(def_id);
|
||||||
|
}
|
||||||
|
def_id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
def_id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn impl_method_has_trait_impl_trait_tys(self, def_id: DefId) -> bool {
|
pub fn impl_method_has_trait_impl_trait_tys(self, def_id: DefId) -> bool {
|
||||||
|
|
Loading…
Add table
Reference in a new issue