Skip to content

Commit db8e92a

Browse files
Aaron1011Centril
andcommitted
Fix nits
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
1 parent d26bfca commit db8e92a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/librustc/ty/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ impl<'tcx> ParamEnv<'tcx> {
16901690
/// which is the default.
16911691
///
16921692
/// All opaque types in the caller_bounds of the `ParamEnv`
1693-
/// will be normalized to their underlying types
1693+
/// will be normalized to their underlying types.
16941694
pub fn with_reveal_all_normalized(self, tcx: TyCtxt<'tcx>) -> Self {
16951695
let caller_bounds = tcx.normalize_impl_trait_types(
16961696
&self.caller_bounds

src/librustc/ty/util.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -738,18 +738,18 @@ impl<'tcx> TyCtxt<'tcx> {
738738
}
739739

740740
struct OpaqueTypeExpander<'tcx> {
741-
// Contains the DefIds of the opaque types that are currently being
742-
// expanded. When we expand an opaque type we insert the DefId of
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
743743
// that type, and when we finish expanding that type we remove the
744-
// its DefId.
744+
// its `DefId`.
745745
seen_opaque_tys: FxHashSet<DefId>,
746746
// Cache of all expansions we've seen so far. This is a critical
747-
// optimization for some large types produced by async fn trees.
747+
// optimization for some large types produced by `async fn` trees.
748748
expanded_cache: FxHashMap<(DefId, SubstsRef<'tcx>), Ty<'tcx>>,
749749
primary_def_id: Option<DefId>,
750750
found_recursion: bool,
751751
// Whether or not to check for recursive opaque types.
752-
// This is 'true' when we're explicitly checking for opaque type
752+
// This is `true` when we're explicitly checking for opaque type
753753
// recursion, and 'false' otherwise to avoid unecessary work.
754754
check_recursion: bool,
755755
tcx: TyCtxt<'tcx>,

src/test/ui/type-alias-impl-trait/opaque-type-in-predicate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
23
// Regression test for issue #65918 - checks that we do not
34
// ICE when attempting to normalize a predicate containting
45
// opaque types

0 commit comments

Comments
 (0)