Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3a44a20

Browse files
committed
The proper name for the rule is "enclosing scope"
1 parent 0b84184 commit 3a44a20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir/src/transform/check_consts/validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
582582
);
583583

584584
if borrowed_place_has_mut_interior {
585-
// Locals without StorageDead follow the "trailing expression" rule, meaning
585+
// Locals without StorageDead follow the "enclosing scope" rule, meaning
586586
// they are essentially anonymous static items themselves.
587587
if self.local_has_storage_dead(place.local) {
588588
self.check_op(ops::CellBorrowBehindRef);

0 commit comments

Comments
 (0)