Skip to content

Commit

Permalink
Fix nits
Browse files Browse the repository at this point in the history
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
  • Loading branch information
Aaron1011 and Centril committed Dec 2, 2019
1 parent d26bfca commit db8e92a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ impl<'tcx> ParamEnv<'tcx> {
/// which is the default.
///
/// All opaque types in the caller_bounds of the `ParamEnv`
/// will be normalized to their underlying types
/// will be normalized to their underlying types.
pub fn with_reveal_all_normalized(self, tcx: TyCtxt<'tcx>) -> Self {
let caller_bounds = tcx.normalize_impl_trait_types(
&self.caller_bounds
Expand Down
10 changes: 5 additions & 5 deletions src/librustc/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,18 +738,18 @@ impl<'tcx> TyCtxt<'tcx> {
}

struct OpaqueTypeExpander<'tcx> {
// Contains the DefIds of the opaque types that are currently being
// expanded. When we expand an opaque type we insert the DefId of
// 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.
// 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.
// 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
// 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// run-pass

// Regression test for issue #65918 - checks that we do not
// ICE when attempting to normalize a predicate containting
// opaque types
Expand Down

0 comments on commit db8e92a

Please sign in to comment.