Skip to content

Commit edc6b93

Browse files
committed
adjust some comments referencing locals
1 parent 9d0b903 commit edc6b93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/interpreter/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,17 +1274,17 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
12741274
dest_ty: Ty<'tcx>,
12751275
) -> EvalResult<'tcx, ()> {
12761276
if let Some(Value::ByRef(dest_ptr)) = old_dest_val {
1277-
// If the local value is already `ByRef` (that is, backed by an `Allocation`),
1277+
// If the value is already `ByRef` (that is, backed by an `Allocation`),
12781278
// then we must write the new value into this allocation, because there may be
12791279
// other pointers into the allocation. These other pointers are logically
12801280
// pointers into the local variable, and must be able to observe the change.
12811281
//
12821282
// Thus, it would be an error to replace the `ByRef` with a `ByVal`, unless we
1283-
// knew for certain that there were no outstanding pointers to this local.
1283+
// knew for certain that there were no outstanding pointers to this allocation.
12841284
self.write_value_to_ptr(src_val, dest_ptr, dest_ty)?;
12851285

12861286
} else if let Value::ByRef(src_ptr) = src_val {
1287-
// If the local value is not `ByRef`, then we know there are no pointers to it
1287+
// If the value is not `ByRef`, then we know there are no pointers to it
12881288
// and we can simply overwrite the `Value` in the locals array directly.
12891289
//
12901290
// In this specific case, where the source value is `ByRef`, we must duplicate
@@ -1301,7 +1301,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
13011301

13021302
} else {
13031303
// Finally, we have the simple case where neither source nor destination are
1304-
// `ByRef`. We may simply copy the source value over the the destintion local.
1304+
// `ByRef`. We may simply copy the source value over the the destintion.
13051305
write_dest(self, src_val);
13061306
}
13071307
Ok(())

0 commit comments

Comments
 (0)