Skip to content

Commit

Permalink
Use doc comments instead of regular comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Dec 2, 2019
1 parent db8e92a commit 33e196d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/librustc/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,20 +737,22 @@ impl<'tcx> TyCtxt<'tcx> {
}
}

/// Expands any nested opaque types, caching the expansion
/// of each (DefId, SubstsRef) pair
struct OpaqueTypeExpander<'tcx> {
// Contains the `DefId`s of the opaque types that are currently being
// expanded. When we expand an opaque type we insert the `DefId` of
// that type, and when we finish expanding that type we remove the
// its `DefId`.
/// Contains the `DefId`s of the opaque types that are currently being
/// expanded. When we expand an opaque type we insert the `DefId` of
/// that type, and when we finish expanding that type we remove the
/// its `DefId`.
seen_opaque_tys: FxHashSet<DefId>,
// Cache of all expansions we've seen so far. This is a critical
// optimization for some large types produced by `async fn` trees.
/// Cache of all expansions we've seen so far. This is a critical
/// optimization for some large types produced by `async fn` trees.
expanded_cache: FxHashMap<(DefId, SubstsRef<'tcx>), Ty<'tcx>>,
primary_def_id: Option<DefId>,
found_recursion: bool,
// Whether or not to check for recursive opaque types.
// This is `true` when we're explicitly checking for opaque type
// recursion, and 'false' otherwise to avoid unecessary work.
/// Whether or not to check for recursive opaque types.
/// This is `true` when we're explicitly checking for opaque type
/// recursion, and 'false' otherwise to avoid unecessary work.
check_recursion: bool,
tcx: TyCtxt<'tcx>,
}
Expand Down

0 comments on commit 33e196d

Please sign in to comment.