]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_index/src/lib.rs
Rollup merge of #103648 - jyn514:no-preview, r=Mark-Simulacrum
[rust.git] / compiler / rustc_index / src / lib.rs
1 #![deny(rustc::untranslatable_diagnostic)]
2 #![deny(rustc::diagnostic_outside_of_impl)]
3 #![cfg_attr(
4     feature = "nightly",
5     feature(
6         allow_internal_unstable,
7         extend_one,
8         min_specialization,
9         new_uninit,
10         step_trait,
11         stmt_expr_attributes,
12         test
13     )
14 )]
15
16 #[cfg(feature = "nightly")]
17 pub mod bit_set;
18 #[cfg(feature = "nightly")]
19 pub mod interval;
20 pub mod vec;
21
22 #[cfg(feature = "rustc_macros")]
23 pub use rustc_macros::newtype_index;
24
25 /// Type size assertion. The first argument is a type and the second argument is its expected size.
26 #[macro_export]
27 macro_rules! static_assert_size {
28     ($ty:ty, $size:expr) => {
29         const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];
30     };
31 }