diff options
| author | Ralf Jung <post@ralfj.de> | 2020-06-19 08:56:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-19 08:56:02 +0200 |
| commit | 5e7eec2eaa8b25d8a607a9ced3ef4df01aab3787 (patch) | |
| tree | a4ab90836968694f335adcc5582e2b98edc570cc /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 99be102a6d18ec05178a0f55ece6c65f65e38c48 (diff) | |
| parent | 10c8d2afb8b90e03e2d1563df021146150338c45 (diff) | |
| download | rust-5e7eec2eaa8b25d8a607a9ced3ef4df01aab3787.tar.gz rust-5e7eec2eaa8b25d8a607a9ced3ef4df01aab3787.zip | |
Rollup merge of #72497 - RalfJung:tag-term, r=oli-obk
tag/niche terminology cleanup The term "discriminant" was used in two ways throughout the compiler: * every enum variant has a corresponding discriminant, that can be given explicitly with `Variant = N`. * that discriminant is then encoded in memory to store which variant is active -- but this encoded form of the discriminant was also often called "discriminant", even though it is conceptually quite different (e.g., it can be smaller in size, or even use niche-filling). After discussion with @eddyb, this renames the second term to "tag". The way the tag is encoded can be either `TagEncoding::Direct` (formerly `DiscriminantKind::Tag`) or `TagEncoding::Niche` (formerly `DiscrimianntKind::Niche`). This finally resolves some long-standing confusion I had about the handling of variant indices and discriminants, which surfaced in https://github.com/rust-lang/rust/pull/72419. (There is also a `DiscriminantKind` type in libcore, it remains unaffected. I think this corresponds to the discriminant, not the tag, so that seems all right.) r? @eddyb
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
