diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-06-03 23:42:21 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-06-03 23:42:21 -0700 |
| commit | ee9901e65c78f70b93dab5bd1e04bd77273b7c40 (patch) | |
| tree | c3092c96901856e9a3529b70cbcb448ab4646bb0 /compiler/rustc_transmute/src/layout/tree.rs | |
| parent | 792fc2b033aea7ea7b766e38bdc40f7d6bdce8c3 (diff) | |
| download | rust-ee9901e65c78f70b93dab5bd1e04bd77273b7c40.tar.gz rust-ee9901e65c78f70b93dab5bd1e04bd77273b7c40.zip | |
Change `tag_field` to `FieldIdx` in `Variants::Multiple`
It was already available as a generic parameter anyway, and it's not like we'll ever put a tag in the 5-billionth field.
Diffstat (limited to 'compiler/rustc_transmute/src/layout/tree.rs')
| -rw-r--r-- | compiler/rustc_transmute/src/layout/tree.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs index 7cf712ce9e9..ff665695b5a 100644 --- a/compiler/rustc_transmute/src/layout/tree.rs +++ b/compiler/rustc_transmute/src/layout/tree.rs @@ -451,7 +451,7 @@ pub(crate) mod rustc { // For enums (but not coroutines), the tag field is // currently always the first field of the layout. - assert_eq!(*tag_field, 0); + assert_eq!(*tag_field, FieldIdx::ZERO); let variants = def.discriminants(cx.tcx()).try_fold( Self::uninhabited(), |
