From 7db96a37e7b4b38cdd0354d715cecd56dfdd03b0 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sat, 16 Feb 2019 14:33:54 +0100 Subject: [PATCH] Reintroduce the invariant comment for clarity --- src/librustc/mir/interpret/value.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs index 1e5ba2c176bd..956182fc8b27 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), }