Skip to content

Commit ce39fff

Browse files
committed
Fix comment about alignments
1 parent 3977cc2 commit ce39fff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/mir/interpret/value.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ pub enum ConstValue<'tcx> {
4646
/// An allocation together with a pointer into the allocation.
4747
/// Invariant: the pointer's `AllocId` resolves to the allocation.
4848
/// The alignment exists to allow `const_field` to have `ByRef` access to nonprimitive fields
49-
/// of packed structs. The alignment may be lower than the alignment of the `Allocation` and
50-
/// allow reads with lower alignment than what the allocation would normally permit.
49+
/// of packed structs. The alignment may be lower than the type of this constant.
50+
/// This permits reads with lower alignment than what the type would normally require.
5151
/// FIXME(RalfJ,oli-obk): The alignment checks are part of miri, but const eval doesn't really
5252
/// need them. Disabling them may be too hard though.
5353
ByRef(Pointer, Align, &'tcx Allocation),

0 commit comments

Comments
 (0)