]> git.lizzy.rs Git - rust.git/commitdiff
we don't need zero-sized freeze-sensitive visiting
authorRalf Jung <post@ralfj.de>
Wed, 3 Jul 2019 07:42:07 +0000 (09:42 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 3 Jul 2019 08:47:28 +0000 (10:47 +0200)
src/helpers.rs

index f65eef557c967260fafc1c0b7dc6d6ca0425a7e8..16451fb8726a6fb49b26133f894b61b7d84f3995 100644 (file)
@@ -58,6 +58,7 @@ fn visit_freeze_sensitive(
             .map(|(size, _)| size)
             .unwrap_or_else(|| place.layout.size)
         );
+        assert!(size.bytes() > 0);
         // Store how far we proceeded into the place so far. Everything to the left of
         // this offset has already been handled, in the sense that the frozen parts
         // have had `action` called on them.