@@ -737,20 +737,22 @@ impl<'tcx> TyCtxt<'tcx> {
737
737
}
738
738
}
739
739
740
+ /// Expands any nested opaque types, caching the expansion
741
+ /// of each (DefId, SubstsRef) pair
740
742
struct OpaqueTypeExpander < ' tcx > {
741
- // Contains the `DefId`s of the opaque types that are currently being
742
- // expanded. When we expand an opaque type we insert the `DefId` of
743
- // that type, and when we finish expanding that type we remove the
744
- // its `DefId`.
743
+ /// Contains the `DefId`s of the opaque types that are currently being
744
+ /// expanded. When we expand an opaque type we insert the `DefId` of
745
+ /// that type, and when we finish expanding that type we remove the
746
+ /// its `DefId`.
745
747
seen_opaque_tys : FxHashSet < DefId > ,
746
- // Cache of all expansions we've seen so far. This is a critical
747
- // optimization for some large types produced by `async fn` trees.
748
+ /// Cache of all expansions we've seen so far. This is a critical
749
+ /// optimization for some large types produced by `async fn` trees.
748
750
expanded_cache : FxHashMap < ( DefId , SubstsRef < ' tcx > ) , Ty < ' tcx > > ,
749
751
primary_def_id : Option < DefId > ,
750
752
found_recursion : bool ,
751
- // Whether or not to check for recursive opaque types.
752
- // This is `true` when we're explicitly checking for opaque type
753
- // recursion, and 'false' otherwise to avoid unecessary work.
753
+ /// Whether or not to check for recursive opaque types.
754
+ /// This is `true` when we're explicitly checking for opaque type
755
+ /// recursion, and 'false' otherwise to avoid unecessary work.
754
756
check_recursion : bool ,
755
757
tcx : TyCtxt < ' tcx > ,
756
758
}
0 commit comments