@@ -737,20 +737,22 @@ impl<'tcx> TyCtxt<'tcx> {
737737 }
738738}
739739
740+ /// Expands any nested opaque types, caching the expansion
741+ /// of each (DefId, SubstsRef) pair
740742struct 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`.
745747 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.
748750 expanded_cache : FxHashMap < ( DefId , SubstsRef < ' tcx > ) , Ty < ' tcx > > ,
749751 primary_def_id : Option < DefId > ,
750752 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.
754756 check_recursion : bool ,
755757 tcx : TyCtxt < ' tcx > ,
756758}
0 commit comments