The proper name for the rule is "enclosing scope"

This commit is contained in:
oli 2020-12-27 23:59:00 +00:00
parent 0b841846ba
commit 3a44a20ed1

View File

@ -582,7 +582,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
);
if borrowed_place_has_mut_interior {
// Locals without StorageDead follow the "trailing expression" rule, meaning
// Locals without StorageDead follow the "enclosing scope" rule, meaning
// they are essentially anonymous static items themselves.
if self.local_has_storage_dead(place.local) {
self.check_op(ops::CellBorrowBehindRef);