Skip to content

Commit 1195bba

Browse files
committed
rustc_abi: stabilize VariantIdx and FieldIdx
1 parent 1210e9f commit 1195bba

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

compiler/rustc_abi/src/layout.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ mod simple;
2020
#[cfg(feature = "nightly")]
2121
mod ty;
2222

23+
pub use ty::{FIRST_VARIANT, FieldIdx, VariantIdx};
2324
#[cfg(feature = "nightly")]
24-
pub use ty::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx};
25+
pub use ty::{Layout, TyAbiInterface, TyAndLayout};
2526

2627
// A variant is absent if it's uninhabited and only has ZST fields.
2728
// Present uninhabited variants only require space for their fields,

compiler/rustc_abi/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ pub use canon_abi::{ArmCall, CanonAbi, InterruptKind, X86Call};
6464
#[cfg(feature = "nightly")]
6565
pub use extern_abi::CVariadicStatus;
6666
pub use extern_abi::{ExternAbi, all_names};
67+
pub use layout::{FIRST_VARIANT, FieldIdx, LayoutCalculator, LayoutCalculatorError, VariantIdx};
6768
#[cfg(feature = "nightly")]
68-
pub use layout::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx};
69-
pub use layout::{LayoutCalculator, LayoutCalculatorError};
69+
pub use layout::{Layout, TyAbiInterface, TyAndLayout};
7070

7171
/// Requirements for a `StableHashingContext` to be used in this crate.
7272
/// This is a hack to allow using the `HashStable_Generic` derive macro

0 commit comments

Comments
 (0)