Skip to content

Commit e52a451

Browse files
committed
fix comment
1 parent 315a3b9 commit e52a451

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/interpret/eval_context.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ pub(super) fn mir_assign_valid_types<'tcx>(
230230

231231
// Type-changing assignments can happen for (at least) two reasons:
232232
// 1. `&mut T` -> `&T` gets optimized from a reborrow to a mere assignment.
233-
// 2. Subtyping is used. While all normal lifetimes are erased, higher-ranked lifetime
234-
// bounds with their late-bound regions are still around and can lead to type differences.
233+
// 2. Subtyping is used. While all normal lifetimes are erased, higher-ranked types
234+
// with their late-bound lifetimes are still around and can lead to type differences.
235235
// Normalize both of them away.
236236
let normalize = |ty: Ty<'tcx>| {
237237
ty.fold_with(&mut BottomUpFolder {
@@ -241,7 +241,7 @@ pub(super) fn mir_assign_valid_types<'tcx>(
241241
ty::Ref(_, pointee, _) => tcx.mk_imm_ref(tcx.lifetimes.re_erased, pointee),
242242
_ => ty,
243243
},
244-
// We just erase all late-bound regions, but this is not fully correct (FIXME):
244+
// We just erase all late-bound lifetimes, but this is not fully correct (FIXME):
245245
// lifetimes in invariant positions could matter (e.g. through associated types).
246246
// We rely on the fact that layout was confirmed to be equal above.
247247
lt_op: |_| tcx.lifetimes.re_erased,

0 commit comments

Comments
 (0)