1
Fork 0

Fix stack overflow with recursive associated types

This commit is contained in:
Oli Scherer 2024-03-12 06:03:43 +00:00
parent 5aad51d015
commit 783490da70
3 changed files with 30 additions and 0 deletions

View file

@ -240,6 +240,10 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for OpaqueTypeCollector<'tcx> {
continue;
}
if !self.seen.insert(assoc.def_id.expect_local()) {
return;
}
let impl_args = alias_ty.args.rebase_onto(
self.tcx,
impl_trait_ref.def_id,