Skip to content

Commit 7db96a3

Browse files
committed
Reintroduce the invariant comment for clarity
1 parent f7c4931 commit 7db96a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc/mir/interpret/value.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub enum ConstValue<'tcx> {
3232
Slice(Scalar, u64),
3333

3434
/// An allocation together with a pointer into the allocation.
35+
/// Invariant: the pointer's `AllocId` resolves to the allocation.
3536
ByRef(Pointer, &'tcx Allocation),
3637
}
3738

0 commit comments

Comments
 (0)