diff options
| author | Lukas Markeffsky <@> | 2025-02-07 19:33:58 +0100 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2025-02-13 00:38:17 +0100 |
| commit | 885e0f1b96112aae9fbdd97d08b69ddc8eb01b1e (patch) | |
| tree | e6174f1571c4131f252bb2fa7fe56ea918c344bf /src/doc/rustc-dev-guide | |
| parent | ef148cd7eb00a5a973130dc6473da71fd6c487ee (diff) | |
| download | rust-885e0f1b96112aae9fbdd97d08b69ddc8eb01b1e.tar.gz rust-885e0f1b96112aae9fbdd97d08b69ddc8eb01b1e.zip | |
intern valtrees
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/mir/index.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/mir/index.md b/src/doc/rustc-dev-guide/src/mir/index.md index 778c583919b..f355875aa15 100644 --- a/src/doc/rustc-dev-guide/src/mir/index.md +++ b/src/doc/rustc-dev-guide/src/mir/index.md @@ -304,9 +304,9 @@ The most important rule for this representation is that every value must be uniquely represented. In other words: a specific value must only be representable in one specific way. For example: there is only one way to represent an array of two integers as a `ValTree`: -`ValTree::Branch(&[ValTree::Leaf(first_int), ValTree::Leaf(second_int)])`. +`Branch([Leaf(first_int), Leaf(second_int)])`. Even though theoretically a `[u32; 2]` could be encoded in a `u64` and thus just be a -`ValTree::Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree` +`Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree` (and is very complex to do, so it is unlikely anyone is tempted to do so). These rules also mean that some values are not representable. There can be no `union`s in type |
