Skip to content

Commit 5b9bd90

Browse files
oli-obkRalfJung
andauthored
Update compiler/rustc_middle/src/ty/consts/valtree.rs
Co-authored-by: Ralf Jung <[email protected]>
1 parent f0997fa commit 5b9bd90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_middle/src/ty/consts/valtree.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use rustc_macros::HashStable;
66
/// This datastructure is used to represent the value of constants used in the type system.
77
///
88
/// We explicitly choose a different datastructure from the way values are processed within
9-
/// CTFE, as in the type system equal values must also have equal representation.
9+
/// CTFE, as in the type system equal values (according to their `PartialEq`) must also have
10+
/// equal representation (`==` on the rustc data structure, e.g. `ValTree`) and vice versa.
1011
/// Since CTFE uses `AllocId` to represent pointers, it often happens that two different
1112
/// `AllocId`s point to equal values. So we may end up with different representations for
1213
/// two constants whose value is `&42`. Furthermore any kind of struct that has padding will

0 commit comments

Comments
 (0)