1#![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
3#![cfg_attr(feature = "nightly", allow(internal_features))]
4#![cfg_attr(feature = "nightly", feature(extend_one, step_trait, test))]
5#![cfg_attr(feature = "nightly", feature(new_zeroed_alloc))]
6#![warn(unreachable_pub)]
7pub mod bit_set;
10#[cfg(feature = "nightly")]
11pub mod interval;
12
13mod idx;
14mod slice;
15mod vec;
16
17pub use idx::Idx;
18pub use rustc_index_macros::newtype_index;
19pub use slice::IndexSlice;
20#[doc(no_inline)]
21pub use vec::IndexVec;
22
23#[macro_export]
37#[cfg(not(feature = "rustc_randomized_layouts"))]
38macro_rules! static_assert_size {
39 ($ty:ty, $size:expr) => {
40 const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];
41 };
42}
43
44#[macro_export]
45#[cfg(feature = "rustc_randomized_layouts")]
46macro_rules! static_assert_size {
47 ($ty:ty, $size:expr) => {
48 const _: (usize, usize) = ($size, ::std::mem::size_of::<$ty>());
51 };
52}