about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-02-16 14:33:54 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-02-16 14:33:54 +0100
commit7db96a37e7b4b38cdd0354d715cecd56dfdd03b0 (patch)
tree8a37778cf85bb964b5a838952a83e1045a30b193
parentf7c493121d4989895dd9c213ed4e877429229b86 (diff)
downloadrust-7db96a37e7b4b38cdd0354d715cecd56dfdd03b0.tar.gz
rust-7db96a37e7b4b38cdd0354d715cecd56dfdd03b0.zip
Reintroduce the invariant comment for clarity
-rw-r--r--src/librustc/mir/interpret/value.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs
index 1e5ba2c176b..956182fc8b2 100644
--- a/src/librustc/mir/interpret/value.rs
+++ b/src/librustc/mir/interpret/value.rs
@@ -32,6 +32,7 @@ pub enum ConstValue<'tcx> {
     Slice(Scalar, u64),
 
     /// An allocation together with a pointer into the allocation.
+    /// Invariant: the pointer's `AllocId` resolves to the allocation.
     ByRef(Pointer, &'tcx Allocation),
 }