]> git.lizzy.rs Git - rust.git/commitdiff
Reorder AllocationDefinedness members
authorAndreas Molzer <andreas.molzer@gmx.de>
Sat, 31 Aug 2019 19:21:29 +0000 (21:21 +0200)
committerAndreas Molzer <andreas.molzer@gmx.de>
Sat, 31 Aug 2019 19:21:29 +0000 (21:21 +0200)
This improves the clarity of the documentation a bit since they can
reference each other when reading the member docs in sequence.

src/librustc/mir/interpret/allocation.rs

index 8e824aeb7916a2bc2996993d73687c8b40e3eb06..db24c1408376832ab36f5fe2395100081d40d43c 100644 (file)
@@ -581,10 +581,11 @@ pub fn mark_definedness(
 /// Run-length encoding of the undef mask.
 /// Used to copy parts of a mask multiple times to another allocation.
 pub struct AllocationDefinedness {
-    /// The lengths of ranges that are run-length encoded.
-    ranges: smallvec::SmallVec::<[u64; 1]>,
     /// The definedness of the first range.
     initial: bool,
+    /// The lengths of ranges that are run-length encoded.
+    /// The definedness of the ranges alternate starting with `initial`.
+    ranges: smallvec::SmallVec::<[u64; 1]>,
 }
 
 /// Transferring the definedness mask to other allocations.