From e52a4519131bccc732f53ec13582016bb2b1d04a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 5 Apr 2020 12:11:33 +0200 Subject: [PATCH] fix comment --- src/librustc_mir/interpret/eval_context.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index 35f2aadff6a..0b182d42287 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -230,8 +230,8 @@ pub(super) fn mir_assign_valid_types<'tcx>( // Type-changing assignments can happen for (at least) two reasons: // 1. `&mut T` -> `&T` gets optimized from a reborrow to a mere assignment. - // 2. Subtyping is used. While all normal lifetimes are erased, higher-ranked lifetime - // bounds with their late-bound regions are still around and can lead to type differences. + // 2. Subtyping is used. While all normal lifetimes are erased, higher-ranked types + // with their late-bound lifetimes are still around and can lead to type differences. // Normalize both of them away. let normalize = |ty: Ty<'tcx>| { ty.fold_with(&mut BottomUpFolder { @@ -241,7 +241,7 @@ pub(super) fn mir_assign_valid_types<'tcx>( ty::Ref(_, pointee, _) => tcx.mk_imm_ref(tcx.lifetimes.re_erased, pointee), _ => ty, }, - // We just erase all late-bound regions, but this is not fully correct (FIXME): + // We just erase all late-bound lifetimes, but this is not fully correct (FIXME): // lifetimes in invariant positions could matter (e.g. through associated types). // We rely on the fact that layout was confirmed to be equal above. lt_op: |_| tcx.lifetimes.re_erased,