diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-16 18:31:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-16 18:31:25 +0100 |
| commit | 5b9bd903c08cb8bfe453e71f8d2d393bcc43819f (patch) | |
| tree | ea50da8fea7d89745ff7c586464e6861b33ea9c2 | |
| parent | f0997fa1e85d305afef2b5b4e74c4a9b1a043ec2 (diff) | |
| download | rust-5b9bd903c08cb8bfe453e71f8d2d393bcc43819f.tar.gz rust-5b9bd903c08cb8bfe453e71f8d2d393bcc43819f.zip | |
Update compiler/rustc_middle/src/ty/consts/valtree.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
| -rw-r--r-- | compiler/rustc_middle/src/ty/consts/valtree.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/consts/valtree.rs b/compiler/rustc_middle/src/ty/consts/valtree.rs index 97e7dd6507b..46be9cec7ab 100644 --- a/compiler/rustc_middle/src/ty/consts/valtree.rs +++ b/compiler/rustc_middle/src/ty/consts/valtree.rs @@ -6,7 +6,8 @@ use rustc_macros::HashStable; /// This datastructure is used to represent the value of constants used in the type system. /// /// We explicitly choose a different datastructure from the way values are processed within -/// CTFE, as in the type system equal values must also have equal representation. +/// CTFE, as in the type system equal values (according to their `PartialEq`) must also have +/// equal representation (`==` on the rustc data structure, e.g. `ValTree`) and vice versa. /// Since CTFE uses `AllocId` to represent pointers, it often happens that two different /// `AllocId`s point to equal values. So we may end up with different representations for /// two constants whose value is `&42`. Furthermore any kind of struct that has padding will |
