Rollup merge of #122366 - oli-obk:opaques_defined_by_overflow, r=lcnr
Fix stack overflow with recursive associated types fixes #122364
This commit is contained in:
commit
0b31375248
3 changed files with 30 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue